home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 …SCII & the Runetime Code / ADC Developer CD (1992-07) (''Butch ASCII And The Runtime Code'')_iso / Dev.CD 199207.iso / Developer Essentials / Localization Information / Documentation Browser / Support files / Interfaces / ResourcesHelp data < prev    next >
Encoding:
Text File  |  1991-03-06  |  278.9 KB  |  5,746 lines  |  [TEXT/MPS ]

  1. æKY CopyrightNotice
  2. æC  Copyright Apple Computer, Inc. 1985-1989, All rights reserved.
  3. 411 - Resources Help - MPW 3.2 Alpha Release.
  4. Friday, December 15, 1989 8:44:57 AM
  5.  
  6. æKY Help,ResourcesHelp
  7. æKL actb
  8. acur
  9. ALRT
  10. BNDL
  11. cctb
  12. cicn
  13. clut
  14. cmdo
  15. CNTL
  16. crsr
  17. CURS
  18. dctb
  19. DITL
  20. DLOG
  21. DRVR
  22. DRVW
  23. fctb
  24. finf
  25. FOND
  26. FONT
  27. FREF
  28. FWID
  29. ICON
  30. ICN#
  31. insc
  32. INTL0
  33. itl0
  34. INTL1
  35. itl1
  36. itl2
  37. itl4
  38. itlb
  39. itlc
  40. itlk
  41. KCAP
  42. KCHR
  43. KMAP
  44. KSWP
  45. MBAR
  46. mcky
  47. mctb
  48. MENU
  49. mppc
  50. mxbc
  51. mxbi
  52. mxbm
  53. mxwt
  54. NFNT
  55. nrct
  56. PAT 
  57. PAT#
  58. PICT
  59. pltt
  60. ppat
  61. ROv#
  62. scrn
  63. SICN
  64. SIZE
  65. snd 
  66. STR 
  67. STR#
  68. wctb
  69. WIND
  70.  
  71. Resources
  72. æKY Resources
  73. æC                                                    Rez             ResEdit  
  74. actb • Alert Color Lookup Table...................Types.r.........Editor
  75. acur • 
  76. ALRT • Alert Template.............................Types.r.........Editor
  77. BNDL • Bundle.....................................Types.r.........Editor
  78. cctb • Control Color Lookup Table.................Types.r.........Editor
  79. cicn • Color Icon.................................Types.r.........General
  80. clut • Generic Color Lookup Table.................Types.r.........Editor
  81. cmdo • For MPW commando interface.................Cmdo.r..........Editor
  82. CNTL • Control Template...........................Types.r.........Editor
  83. crsr • Color Cursor...............................Types.r.........General
  84. CURS • Cursor.....................................Types.r.........Editor
  85. dctb • Dialog Color Lookup Table..................Types.r.........Editor
  86. DITL • Dialog Item List...........................Types.r.........Editor
  87. DLOG • Dialog Template............................Types.r.........Editor
  88. DRVR • Driver.....................................SysTypes.r......Editor
  89. fctb • Font Color Lookup Table....................Types.r.........Editor
  90. finf • Font information...........................SysTypes.r......Editor
  91. FOND • Font Family Description....................SysTypes.r......Editor
  92. FONT • Font Description...........................SysTypes.r......Editor
  93. FREF • File Reference.............................Types.r.........Editor
  94. FWID • Font Width Table...........................SysTypes.r......Editor
  95. ICON • Icon.......................................Types.r.........Editor
  96. ICN# • Icon List..................................Types.r.........Editor
  97. insc • Installer Script...........................SysTypes.r......Editor
  98. INTL0 • International Formatting Information......SysTypes.r......Editor
  99. itl0 • International Formatting Information.......SysTypes.r......Editor
  100. INTL1 • International Date/Time Information.......SysTypes.r......Editor
  101. itl1 • International Date/Time Information........SysTypes.r......Editor
  102. itl2 • Intl Str Comparision Package Hooks.........SysTypes.r......General
  103. itl4 • International Tokenize.....................SysTypes.r......General
  104. itlb • International Script Bundle................SysTypes.r......Editor
  105. itlc • International Configuration................SysTypes.r......Editor
  106. itlk • Intl exception dictionary for kchar........          ......Editor
  107. KCAP • Physical Layout of Keyboard................SysTypes.r......Editor
  108. KCHR • ASCII Mapping (software)...................SysTypes.r......Editor
  109. KMAP • Keyboard Mapping (hardware)................SysTypes.r......Editor
  110. KSWP • Keyboard Swapping..........................SysTypes.r......General
  111. MBAR • Menu Bar...................................Types.r.........Editor
  112. mcky • Mouse Tracking.............................SysTypes.r......General
  113. mctb • Menu Color Lookup Table....................Types.r.........Editor
  114. MENU • Menu.......................................Types.r.........Editor
  115. mppc • MPP Configuration Resource.................SysTypes.r......General
  116. mxbc • MacsBug 6.0 ...............................          ......General
  117. mxbi • MacsBug 6.0 init...........................          ......General
  118. mxbm • MacsBug 6.0 macros.........................          ......General
  119. mxwt • MacsBug 6.0 templates......................          ......General
  120. NFNT • Font Description...........................SysTypes.r......General
  121. nrct • Rectangle position list....................SysTypes.r......Editor
  122. PAT  • Quickdraw Pattern..........................Types.r.........Editor
  123. PAT# • Quickdraw Pattern List.....................Types.r.........Editor
  124. PICT • Quickdraw Picture..........................Types.r.........Editor
  125. pltt • Color Palette..............................Types.r.........Editor
  126. ppat • Pixel Pattern..............................Types.r.........Editor
  127. ROv# • ROM Resource Override......................SysTypes.r......Editor
  128. scrn • Screen Configuration.......................SysTypes.r......Editor
  129. SICN • Small Icon.................................Types.r.........Editor
  130. SIZE • MultiFinder Size Information...............Types.r.........Editor
  131. snd  • Sound......................................SysTypes.r......General
  132. STR  • PascalStyle String.........................Types.r.........Editor
  133. STR# • PascalStyle String List....................Types.r.........Editor
  134. wctb • Window Color Lookup Table..................Types.r.........Editor
  135. WIND • Window Template............................Types.r.........Editor
  136. æKY actb
  137. æC  /*----------------------------actb • Alert Color Lookup Table----------------------------*/
  138. type 'actb' {
  139.      unsigned hex longint;                                   /* ctSeed               */
  140.      integer;                                                /* ctFlags              */
  141.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  142.      wide array ColorSpec {
  143.              integer     wContentColor,                      /* value                */
  144.                          wFrameColor,
  145.                          wTextColor,
  146.                          wHiliteColor,
  147.                          wTitleBarColor;
  148.              unsigned integer;                               /* RGB: red             */
  149.              unsigned integer;                               /*      green           */
  150.              unsigned integer;                               /*      blue            */
  151.      };
  152. };
  153. æKY acur
  154. æC  /*------------------------acur •              ----------------------------------*/
  155. type 'acur' {
  156.        integer = $$CountOf(CursIdArray); /* Nbr of cursors                 */
  157.        fill word;                        /* Next frame to show             */
  158.        array CursIdArray {
  159.            integer;                      /* 'CURS' resource id for a frame */
  160.            fill word;                    /* Pad word to make longint       */
  161.        };
  162. };
  163.  
  164. æKY ALRT
  165. æC  /*----------------------------ALRT • Alert Template-------------------------------------*/
  166. type 'ALRT' {
  167.      rect;                                                   /* boundsRect           */
  168.      integer;                                                /* 'DITL' ID            */
  169.  
  170.      /* NOTE: the stages are ordered 4, 3, 2, 1 */
  171.      wide array [4] {
  172.              boolean                 OK, Cancel;             /* Bold Outline         */
  173.              boolean                 invisible, visible;     /* Draw Alert           */
  174.              unsigned bitstring[2]   silent = 0
  175.                              sound1, sound2, sound3;         /* Beeps                */
  176.      };
  177. };
  178. æKY BNDL
  179. æC  /*----------------------------BNDL • Bundle---------------------------------------------*/
  180. type 'BNDL' {
  181.      literal longint;                                        /* Signature            */
  182.      integer;                                                /* Version ID           */
  183.      integer = $$CountOf(TypeArray) - 1;
  184.      array TypeArray {
  185.              literal longint;                                /* Type                 */
  186.              integer = $$CountOf(IDArray) - 1;
  187.              wide array IDArray {
  188.                      integer;                                /* Local ID             */
  189.                      integer;                                /* Actual ID            */
  190.              };
  191.      };
  192. };
  193. æKY cctb
  194. æC  /*----------------------------cctb • Control Color Lookup Table-------------------------*/
  195. type 'cctb' {
  196.      unsigned hex longint;                                   /* CCSeed               */
  197.      integer;                                                /* ccReserved           */
  198.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  199.      wide array ColorSpec {
  200.              integer     cFrameColor,                        /* partcode             */
  201.                          cBodyColor,
  202.                          cTextColor,
  203.                          cElevatorColor;
  204.              unsigned integer;                               /* RGB: red             */
  205.              unsigned integer;                               /*      green           */
  206.              unsigned integer;                               /*      blue            */
  207.      };
  208. };
  209.  
  210. æKY cicn
  211. æC  /*----------------------------cicn • Color Icon-----------------------------------------*/
  212. #define  PIXMAPHEIGHT    ($$BitField(Bounds, 32, 16) /* bottom */    \
  213.                      - $$BitField(Bounds, 0, 16) /* top */)
  214.  
  215. type 'cicn' {
  216.      /* IconPMap (pixMap) record */
  217.      fill long;                                              /* Base address         */
  218.      unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  219.      unsigned bitstring[2] = 0;                              /* Must be 0            */
  220. pMapRowBytes:
  221.      unsigned bitstring[13];                                 /* Offset to next row   */
  222. Bounds:
  223.      rect;                                                   /* Bitmap bounds        */
  224.      integer;                                                /* pixMap vers number   */
  225.      integer unpacked;                                       /* Packing format       */
  226.      unsigned longint;                                       /* Size of pixel data   */
  227.      unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  228.      unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  229.      integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  230.      integer;                                                /* # bits in pixel      */
  231.      integer;                                                /* # components in pixel*/
  232.      integer;                                                /* # bits per field     */
  233.      unsigned longint;                                       /* Offset to next plane */
  234.      unsigned longint;                                       /* Offset to color table*/
  235.      fill long;                                              /* Reserved             */
  236.  
  237.      /* IconMask (bitMap) record */
  238.      fill long;                                              /* Base address         */
  239. maskRowBytes:
  240.      integer;                                                /* Row bytes            */
  241.      rect;                                                   /* Bitmap bounds        */
  242.      
  243.      /* IconBMap (bitMap) record */
  244.      fill long;                                              /* Base address         */
  245. iconBMapRowBytes:
  246.      integer;                                                /* Row bytes            */
  247.      rect;                                                   /* Bitmap bounds        */
  248.      
  249.      fill long;                                              /* Handle placeholder   */
  250.      
  251.      /* Mask data */
  252.      hex string [$$Word(maskRowBytes) * PIXMAPHEIGHT];       
  253.  
  254.      /* BitMap data */
  255.      hex string [$$Word(iconBMapRowBytes) * PIXMAPHEIGHT];       
  256.  
  257.      /* Color Table */
  258.      unsigned hex longint;                                   /* ctSeed               */
  259.      integer;                                                /* ctFlags              */
  260.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  261.      wide array ColorSpec {
  262.              integer;                                        /* value                */
  263.              unsigned integer;                               /* RGB: red             */
  264.              unsigned integer;                               /*      green           */
  265.              unsigned integer;                               /*      blue            */
  266.      };
  267.  
  268.      /* PixelMap data */
  269.      hex string [$$BitField(pMapRowBytes, 0, 13) * PIXMAPHEIGHT];
  270. };
  271. _______________________________________________________________________________
  272.  
  273. »COLOR QUICKDRAW RESOURCE FORMATS
  274. _______________________________________________________________________________
  275.  
  276. Several new resource types have been defined for use with Color QuickDraw. They
  277. are
  278.  
  279.   'crsr'    Color cursor resource type
  280.   'ppat'    Pixel Pattern resource type
  281.   'cicn'    Color Icon resource type
  282.   'clut'    Color Look-Up Table resource type
  283.  
  284. The precise formats of resources of these types are given below.
  285.  
  286. It is important to note that resources are used somewhat differently by Color QuickDraw.
  287. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  288. the same handle would be passed back to the application each time. With Color QuickDraw,
  289. the color cursor, icon, and pattern are compound structures, more complex than a
  290. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  291. then alters the copy before passing it to the application. Each time you call GetCCursor,
  292. you get a new copy of the cursor. This means that you should do one GetCCursor call
  293. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  294. should be marked as purgeable if you are concerned about memory space.
  295.  
  296. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  297. are measured from the beginning of the resource’s data.
  298.  
  299. »'cicn' (Color Icon)
  300.  
  301.     IconPMap            {pixMap describing icon’s pixel image}
  302.         baseAddr        [4 bytes] = 0
  303.         rowBytes        [2 bytes] = rowBytes of image
  304.         bounds          [8 bytes] = boundary rectangle of image
  305.         pmVersion       [2 bytes] = 0
  306.         packType        [2 bytes] = 0
  307.         packSize        [4 bytes] = 0
  308.         hRes            [4 bytes] = $00480000
  309.         vRes            [4 bytes] = $00480000
  310.         pixelType       [2 bytes] = 0 = chunky
  311.         pixelSize       [2 bytes] = bits per pixel in image
  312.         cmpCount        [2 bytes] = 1
  313.         cmpSize         [2 bytes] = pixelsize
  314.         planeBytes      [4 bytes] = 0
  315.         pmTable         [4 bytes] = 0
  316.         pmReserved      [4 bytes] = 0
  317.     IconMask            {Mask used when drawing icon}
  318.         baseAddr        [4 bytes] = 0
  319.         rowBytes        [2 bytes] = rowBytes of image
  320.         bounds          [8 bytes] = boundary rectangle of image
  321.     IconBMap            {Image used when drawing to 1 bit screen}
  322.         baseAddr        [4 bytes] = 0
  323.         rowBytes        [2 bytes] = rowBytes of image
  324.         bounds          [8 bytes] = boundary rectangle of image
  325.     IconData            {placeholder for image’s handle}
  326.                         [4 bytes] = 0
  327.     MaskData            {the icon’s mask data }
  328.                         [n bytes] n = IconMask.rowBytes*height
  329.     BMapData            {the icon’s bitMap data }
  330.                         [n bytes] n = IconBMap.rowBytes*height
  331.     PMapCTab            {the icon’s color table }
  332.                         [n bytes] n = 8+(ColorTable.ctSize+1)*CTEntrySize
  333.     PMapData            {the icon’s image data }
  334.                         [n bytes] n = IconPMap.rowBytes*height
  335.  
  336. In the calculations above:
  337.  
  338.      height = IconPMap^^.bounds.bottom–IconPMap^^.bounds.top.
  339.  
  340. IconPMap is the pixMap describing the data in the IconData field. IconMask is the
  341. mask that is to be applied to the data when it is drawn. IconBMap is a bitMap to be
  342. drawn when the destination is only one or two pixels deep. If the rowbytes field of
  343. IconBMap is 0, then no data is loaded in for the IconBMap, and IconPMap is always
  344. used when drawing the icon. MaskData is the mask’s data. It is immediately followed
  345. by the bitMap’s data (which may be NIL). Next is the color table describing the
  346. IconPMap, as shown below. The final entry in the resource is the pixMap’s data.
  347.  
  348. æKY clut
  349. æC  /*----------------------------clut • Generic Color Lookup Table-------------------------*/
  350. type 'clut' {
  351.      unsigned hex longint;                                   /* ctSeed               */
  352.      integer;                                                /* ctFlags              */
  353.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  354.      wide array ColorSpec {
  355.              integer;                                        /* value                */
  356.              unsigned integer;                               /* RGB: red             */
  357.              unsigned integer;                               /*      green           */
  358.              unsigned integer;                               /*      blue            */
  359.      };
  360. };
  361. _______________________________________________________________________________
  362.  
  363. »COLOR QUICKDRAW RESOURCE FORMATS
  364. _______________________________________________________________________________
  365.  
  366. Several new resource types have been defined for use with Color QuickDraw. They
  367. are
  368.  
  369.   'crsr'    Color cursor resource type
  370.   'ppat'    Pixel Pattern resource type
  371.   'cicn'    Color Icon resource type
  372.   'clut'    Color Look-Up Table resource type
  373.  
  374. The precise formats of resources of these types are given below.
  375.  
  376. It is important to note that resources are used somewhat differently by Color QuickDraw.
  377. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  378. the same handle would be passed back to the application each time. With Color QuickDraw,
  379. the color cursor, icon, and pattern are compound structures, more complex than a
  380. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  381. then alters the copy before passing it to the application. Each time you call GetCCursor,
  382. you get a new copy of the cursor. This means that you should do one GetCCursor call
  383. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  384. should be marked as purgeable if you are concerned about memory space.
  385.  
  386. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  387. are measured from the beginning of the resource’s data.
  388.  
  389. »'clut' (Color Table)
  390.  
  391.         ctSeed         [4 bytes] = 0
  392.         ctFlags        [2 bytes] = $0000 if pixMap color table
  393.                                  = $8000 if device color table
  394.         ctSize         [2 bytes] = #entries – 1
  395.         table data     [n bytes] n = 8*(ctSize+1)
  396.  
  397. The 'clut' resource format is an exact duplicate of a color table in memory.  Each
  398. element in the table data is four integers (eight bytes): a value field followed by
  399. red, green, and blue values.  If the color table is used to describe a pixMap, then
  400. ctFlags should be set to 0, and the value field of each entry contains the pixel
  401. value to be associated with the following RGB.  If the color table is used to describe
  402. a device, then ctFlags should be set to $8000, and the value fields should be set to
  403. 0.  In this case, the implicit values are based on each entry’s position in the
  404. table.
  405.  
  406. There are several default color tables that are in the Macintosh II ROMs.  There is
  407. one for each of the standard pixel depths.  The resource ID for each table is the
  408. same as the depth.  For example, the default color table used when you switch your
  409. system to 8 bits per pixel mode is stored with resource ID = 8.
  410.  
  411. There is one other default color table.  This color table defines the eight QuickDraw
  412. colors, the colors displayed by programs using the old QuickDraw model.  This color
  413. table has ID = 127.  Its values are given in the section
  414. “Setting the Foreground and Background Colors”.
  415.  
  416. æKY CNTL
  417. æC  /*----------------------------CNTL • Control Template-----------------------------------*/
  418. type 'CNTL' {
  419.      rect;                                                   /* Bounds               */
  420.      integer;                                                /* Value                */
  421.      byte            invisible, visible;                     /* visible              */
  422.      fill byte;
  423.      integer;                                                /* Max                  */
  424.      integer;                                                /* Min                  */
  425.      integer         pushButProc,                            /* ProcID               */
  426.                      checkBoxProc,
  427.                      radioButProc,
  428.                      pushButProcUseWFont = 8,
  429.                      checkBoxProcUseWFont,
  430.                      radioButProcUseWFont,
  431.                      scrollBarProc = 16;
  432.      longint;                                                /* RefCon               */
  433.      pstring;                                                /* Title                */
  434. };
  435. æKY crsr
  436. æC  /*----------------------------crsr • Color Cursor---------------------------------------*/
  437. type 'crsr' {
  438.      /* CCrsr record */
  439.      hex unsigned integer    oldCursor   = $8000,            /* Type of cursor       */
  440.                              colorCursor = $8001;
  441.      unsigned longint = pixMap / 8;                          /* Offset to pixMap     */
  442.      unsigned longint = pixelData / 8;                       /* Offset to pixel data */
  443.      fill long;                                              /* Expanded cursor data */
  444.      fill word;                                              /* Expanded data depth  */
  445.      fill long;                                              /* Reserved             */
  446.      hex string [32];                                        /* One bit cursor data  */
  447.      hex string [32];                                        /* One bit cursor mask  */
  448.      point;                                                  /* Hot spot             */
  449.      fill long;                                              /* Table id             */
  450.      fill long;                                              /* id for cursor        */
  451.  
  452.      /* IconPMap (pixMap) record */
  453. pixMap:
  454.      fill long;                                              /* Base address         */
  455.      unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  456.      unsigned bitstring[2] = 0;                              /* Must be 0            */
  457.      unsigned bitstring[13];                                 /* Offset to next row   */
  458.      rect;                                                   /* Bitmap bounds        */
  459.      integer;                                                /* pixMap version number*/
  460.      integer unpacked;                                       /* Packing format       */
  461.      unsigned longint;                                       /* Size of pixel data   */
  462.      unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  463.      unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  464.      integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  465.      integer;                                                /* # bits in pixel      */
  466.      integer;                                                /* # components in pixel*/
  467.      integer;                                                /* # bits per field     */
  468.      unsigned longint;                                       /* Offset to next plane */
  469.      unsigned longint = colorTable / 8;                      /* Offset to color table*/
  470.      fill long;                                              /* Reserved             */
  471.  
  472. pixelData:
  473.      hex string [(colorTable - pixelData) / 8];              /* Pixel data           */
  474.  
  475.      /* Color Table */
  476. colorTable:
  477.      unsigned hex longint;                                   /* ctSeed               */
  478.      integer;                                                /* ctFlags              */
  479.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  480.      wide array ColorSpec {
  481.              integer;                                        /* value                */
  482.              unsigned integer;                               /* RGB: red             */
  483.              unsigned integer;                               /*      green           */
  484.              unsigned integer;                               /*      blue            */
  485.      };
  486. };
  487. _______________________________________________________________________________
  488.  
  489. »COLOR QUICKDRAW RESOURCE FORMATS
  490. _______________________________________________________________________________
  491.  
  492. Several new resource types have been defined for use with Color QuickDraw. They
  493. are
  494.  
  495.   'crsr'    Color cursor resource type
  496.   'ppat'    Pixel Pattern resource type
  497.   'cicn'    Color Icon resource type
  498.   'clut'    Color Look-Up Table resource type
  499.  
  500. The precise formats of resources of these types are given below.
  501.  
  502. It is important to note that resources are used somewhat differently by Color QuickDraw.
  503. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  504. the same handle would be passed back to the application each time. With Color QuickDraw,
  505. the color cursor, icon, and pattern are compound structures, more complex than a
  506. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  507. then alters the copy before passing it to the application. Each time you call GetCCursor,
  508. you get a new copy of the cursor. This means that you should do one GetCCursor call
  509. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  510. should be marked as purgeable if you are concerned about memory space.
  511.  
  512. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  513. are measured from the beginning of the resource’s data.
  514.  
  515. »'crsr' (Color Cursor)
  516.  
  517.     CCrsr               {data structure describing cursor}
  518.         crsrType:       [2 bytes] = $8001
  519.         crsrMap:        [4 bytes] = offset to pixMap structure
  520.         crsrData:       [4 bytes] = offset to pixel data
  521.         crsrXData:      [4 bytes] = 0
  522.         crsrXValid:     [2 bytes] = 0
  523.         crsrXHandle:    [4 bytes] = 0
  524.         crsr1Data:      [32 bytes] = 1 bit image for cursor
  525.         crsrMask:       [32 bytes] = cursor’s mask
  526.         crsrHotSpot:    [4 bytes] = cursor’s hotSpot (v,h)
  527.         crsrXTable:     [4 bytes] = 0
  528.         crsrID:         [4 bytes] = 0
  529.     PixMap              {pixMap describing cursor’s pixel image}
  530.         baseAddr:       [4 bytes] = 0
  531.         rowBytes:       [2 bytes] = rowBytes of image
  532.         bounds:         [8 bytes] = boundary rectangle of image
  533.         pmVersion:      [2 bytes] = 0
  534.         packType:       [2 bytes] = 0
  535.         packSize:       [4 bytes] = 0
  536.         hRes:           [4 bytes] = $00480000
  537.         vRes:           [4 bytes] = $00480000
  538.         pixelType:      [2 bytes] = 0 = chunky
  539.         pixelSize:      [2 bytes] = bits per pixel in image
  540.         cmpCount:       [2 bytes] = 1
  541.         cmpSize:        [2 bytes] = pixelsize
  542.         planeBytes:     [4 bytes] = 0
  543.         pmTable:        [4 bytes] = offset to color table data
  544.         pmReserved:     [4 bytes] = 0
  545.     pixel data          [see below]        data for cursor
  546.     color table data    [see below]        data for color table
  547.  
  548. The crsrMap field of the CCrsr record contains an offset to the pixMap record from
  549. the beginning of the resource data. The crsrData field of the CCrsr record contains
  550. an offset to the pixel data from the beginning of the resource data. The pmTable
  551. field of the pixMap record contains an offset to the color table data from the beginning
  552. of the resource data. The size of the pixelData is calculated by subtracting the
  553. offset to the pixel data from the offset to the color table data.  The color table
  554. data consists of a color table record
  555. (ctSeed, ctFlags, ctSize) followed by ctSize+1 color table entries. Each entry in the
  556. color table connects a pixel value used in the pixel data to an actual RGB.
  557.  
  558. æKY CURS
  559. æC  /*----------------------------CURS • Cursor---------------------------------------------*/
  560. type 'CURS' {
  561.      hex string [32];                                        /* Data                 */
  562.      hex string [32];                                        /* Mask                 */
  563.      point;                                                  /* Hot spot             */
  564. };
  565. æKY dctb
  566. æC  /*----------------------------dctb • Dialog Color Lookup Table--------------------------*/
  567. type 'dctb' as 'actb';
  568. æKY DITL
  569. æC  /*----------------------------DITL • Dialog Item List-----------------------------------*/
  570. type 'DITL' {
  571.      integer = $$CountOf(DITLarray) - 1;                     /* Array size           */
  572.      wide array DITLarray {
  573.              fill long;
  574.              rect;                                           /* Item bounds          */
  575.              switch {
  576.              case Button:
  577.                      boolean         enabled,disabled;       /* Enable flag          */
  578.                      key bitstring[7] = 4;
  579.                      pstring;                                /* Title                */
  580.  
  581.              case CheckBox:
  582.                      boolean         enabled,disabled;       /* Enable flag          */
  583.                      key bitstring[7] = 5;
  584.                      pstring;                                /* Title                */
  585.  
  586.              case RadioButton:
  587.                      boolean         enabled,disabled;       /* Enable flag          */
  588.                      key bitstring[7] = 6;
  589.                      pstring;                                /* Title                */
  590.  
  591.              case Control:
  592.                      boolean         enabled,disabled;       /* Enable flag          */
  593.                      key bitstring[7] = 7;
  594.                      byte = 2;
  595.                      integer;                                /* 'CTRL' ID            */
  596.  
  597.              case StaticText:
  598.                      boolean         enabled,disabled;       /* Enable flag          */
  599.                      key bitstring[7] = 8;
  600.                      pstring;                                /* Text                 */
  601.  
  602.              case EditText:
  603.                      boolean         enabled,disabled;       /* Enable flag          */
  604.                      key bitstring[7] = 16;
  605.                      pstring;                                /* Text                 */
  606.  
  607.              case Icon:
  608.                      boolean         enabled,disabled;       /* Enable flag          */
  609.                      key bitstring[7] = 32;
  610.                      byte = 2;
  611.                      integer;                                /* 'ICON' ID            */
  612.  
  613.              case Picture:
  614.                      boolean         enabled,disabled;       /* Enable flag          */
  615.                      key bitstring[7] = 64;
  616.                      byte = 2;
  617.                      integer;                                /* 'PICT' ID            */
  618.  
  619.              case UserItem:
  620.                      boolean         enabled,disabled;       /* Enable flag          */
  621.                      key bitstring[7] = 0;
  622.                      byte = 0;
  623.              };
  624.              align word;
  625.      };
  626. };
  627. æKY DLOG
  628. æC  /*----------------------------DLOG • Dialog Template------------------------------------*/
  629. type 'DLOG' {
  630.      rect;                                                   /* boundsRect           */
  631.      integer         documentProc,                           /* procID               */
  632.                      dBoxProc,
  633.                      plainDBox,
  634.                      altDBoxProc,
  635.                      noGrowDocProc,
  636.                      zoomDocProc = 8,
  637.                      zoomNoGrow = 12,
  638.                      rDocProc = 16;
  639.      byte            invisible, visible;                     /* visible              */
  640.      fill byte;
  641.      byte            noGoAway, goAway;                       /* goAway               */
  642.      fill byte;
  643.      unsigned hex longint;                                   /* refCon               */
  644.      integer;                                                /* 'DITL' ID            */
  645.      pstring;                                                /* title                */
  646. };
  647. æKY fctb
  648. æC  /*----------------------------fctb • Font Color Lookup Table----------------------------*/
  649. type 'fctb' as 'clut';
  650.  
  651. »Font Color Tables
  652.  
  653. Note:  The extensions to the Font Manager described in the following paragraphs
  654.        were originally documented in Inside Macintosh, Volume V.  As such,
  655.        this information refers to the Macintosh SE and Macintosh II ROMs and
  656.        System file version 4.1 and later.
  657.  
  658. With resources of type 'NFNT', you can specify absolute colors for the font by also
  659. supplying a color table.  Stored as a resource of type 'fctb' with the same ID as the
  660. associated 'NFNT' resource, this table is simply the ColorTable record described in
  661. the Color Manager chapter.
  662.  
  663. A 4-bit font depth provides index values for a color table containing 16 entries.  If
  664. there are index values for which no corresponding entries are found in the associated
  665. color table, the Font Manager assigns colors based on the current port’s foreground
  666. and background colors.  If only one entry is missing, it’s assigned the background
  667. color.  If two entries are missing, the higher index value is assigned the foreground
  668. color and the lower value is given the background color.  If more than two values are
  669. missing, the entries are given shades ranging between the foreground and background
  670. colors.  Figure 19 shows a hypothetical color table for a 2-bit font in which only
  671. five entries have been supplied in the 'fctb' resource.
  672.  
  673. •••Refer to Figure 19.•••
  674.  
  675. Figure 19–Hypothetical Font Color Table Entries
  676.  
  677. If no color table is provided, the highest and lowest possible index values for any
  678. given screen depth (with a 2-bit screen depth, for example, values 7 and 0) are
  679. assigned the foreground and background colors respectively, with the remaining entries
  680. given shades in between.  This allows gray-scale fonts to be created with as many
  681. levels of gray as are needed (since each gray is just a color in between a foreground
  682. of black and a background of white) without needing a color table.
  683.  
  684. æKY FREF
  685. æC  /*----------------------------FREF • File Reference-------------------------------------*/
  686. type 'FREF' {
  687.      literal longint;                                        /* File Type            */
  688.      integer;                                                /* Icon ID              */
  689.      pstring;                                                /* Filename             */
  690. };
  691. æKY ICON
  692. æC  /*----------------------------ICON • Icon-----------------------------------------------*/
  693. type 'ICON' {
  694.      hex string[128];                                        /* Icon data            */
  695. };
  696. æKY ICN#
  697. æC  /*----------------------------ICN# • Icon List------------------------------------------*/
  698. type 'ICN#' {
  699.      array {
  700.              hex string[128];                                /* Icon data            */
  701.      };
  702. };
  703. æKY MENU
  704. æC  /*----------------------------MENU • Menu-----------------------------------------------*/
  705. type 'MENU' {
  706.      integer;                                                /* Menu ID              */
  707.      fill word[2];
  708.      integer         textMenuProc = 0;                       /* ID of menu def proc  */
  709.      fill word;
  710.      unsigned hex bitstring[31]
  711.                      allEnabled = 0x7FFFFFFF;                /* Enable flags         */
  712.      boolean         disabled, enabled;                      /* Menu enable          */
  713.      pstring         apple = "\0x14";                        /* Menu Title           */
  714.      wide array {
  715.              pstring;                                        /* Item title           */
  716.              byte            noIcon;                         /* Icon number          */
  717.              char            noKey = "\0x00",                /* Key equivalent or    */
  718.                              hierarchicalMenu = "\0x1B";     /* hierarchical menu    */
  719.              char            noMark = "\0x00",               /* Marking char or id   */
  720.                              check = "\0x12";                /* of hierarchical menu */
  721.              fill bit;
  722.              unsigned bitstring[7]
  723.                              plain;                          /* Style                */
  724.      };
  725.      byte = 0;
  726. };
  727. æKY MBAR
  728. æC  /*----------------------------MBAR • Menu Bar-------------------------------------------*/
  729. type 'MBAR' {
  730.      integer = $$CountOf(MenuArray);                         /* Number of menus      */
  731.      wide array MenuArray{
  732.              integer;                                        /* Menu resource ID     */
  733.      };
  734. };
  735. æKY mctb
  736. æC  /*----------------------------mctb • Menu Color Lookup Table----------------------------*/
  737. type 'mctb' {
  738.      integer = $$CountOf(MCTBArray);                         /* Color table count    */
  739.      wide array MCTBArray {
  740.          integer             mctbLast = -99;                 /* Menu resource ID     */
  741.          integer;                                            /* Menu Item            */
  742.          wide array [4] {
  743.                  unsigned integer;                           /* RGB: red             */
  744.                  unsigned integer;                           /*      green           */
  745.                  unsigned integer;                           /*      blue            */
  746.          };
  747.          fill word;                                          /* Reserved word        */
  748.      };
  749. };
  750. æKY PAT 
  751. æC  /*----------------------------PAT  • Quickdraw Pattern----------------------------------*/
  752. type 'PAT ' {
  753.      hex string[8];                                          /* Pattern              */
  754. };
  755. æKY PAT#
  756. æC  /*----------------------------PAT# • Quickdraw Pattern List-----------------------------*/
  757. type 'PAT#' {
  758.      integer = $$Countof(PatArray);
  759.      array PatArray {
  760.              hex string[8];                                  /* Pattern              */
  761.      };
  762. };
  763. æKY pltt
  764. æC  /*----------------------------pltt • Color Palette--------------------------------------*/
  765. type 'pltt' {
  766.      integer = $$CountOf(ColorInfo);                         /* Color table count    */      
  767.      fill long;                                              /* Reserved             */
  768.      fill word;                                              /* Reserved             */
  769.      fill long;                                              /* Reserved             */
  770.      fill long;                                              /* Reserved             */
  771.      wide array ColorInfo {
  772.          unsigned integer;                                   /* RGB: red             */
  773.          unsigned integer;                                   /*      green           */
  774.          unsigned integer;                                   /*      blue            */
  775.          integer     pmCourteous, pmDithered, pmTolerant,    /* Color usage          */
  776.                      pmAnimated = 4, pmExplicit = 8;
  777.          integer;                                            /* Tolerance value      */
  778.          fill word;                                          /* Private flags        */
  779.          fill long;                                          /* Private              */
  780.      };
  781. };
  782.  
  783. æKY ppat
  784. æC  /*----------------------------ppat • Pixel Pattern--------------------------------------*/
  785. type 'ppat' {
  786.      /* PixPat record */
  787.      integer     oldPattern,                                 /* Pattern type         */
  788.                  newPattern,
  789.                  ditherPattern;
  790.      unsigned longint = PixMap / 8;                          /* Offset to pixmap     */
  791.      unsigned longint = PixelData / 8;                       /* Offset to data       */
  792.      fill long;                                              /* Expanded pixel image */
  793.      fill word;                                              /* Pattern valid flag   */
  794.      fill long;                                              /* expanded pattern     */
  795.      hex string [8];                                         /* old-style pattern    */
  796.  
  797.      /* PixMap record */
  798. PixMap:
  799.      fill long;                                              /* Base address         */
  800.      unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  801.      unsigned bitstring[2] = 0;                              /* Must be 0            */
  802.      unsigned bitstring[13];                                 /* Offset to next row   */
  803.      rect;                                                   /* Bitmap bounds        */
  804.      integer;                                                /* pixMap vers number   */
  805.      integer     unpacked;                                   /* Packing format       */
  806.      unsigned longint;                                       /* size of pixel data   */
  807.      unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  808.      unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  809.      integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  810.      integer;                                                /* # bits in pixel      */
  811.      integer;                                                /* # components in pixel*/
  812.      integer;                                                /* # bits per field     */
  813.      unsigned longint;                                       /* Offset to next plane */
  814.      unsigned longint = ColorTable / 8;                      /* Offset to color table*/
  815.      fill long;                                              /* Reserved             */
  816.  
  817. PixelData:
  818.      hex string [(ColorTable - PixelData) / 8];
  819.  
  820. ColorTable:
  821.      unsigned hex longint;                                   /* ctSeed               */
  822.      integer;                                                /* ctFlags              */
  823.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  824.      wide array ColorSpec {
  825.              integer;                                        /* value                */
  826.              unsigned integer;                               /* RGB: red             */
  827.              unsigned integer;                               /*      green           */
  828.              unsigned integer;                               /*      blue            */
  829.      };
  830. };
  831.  
  832. _______________________________________________________________________________
  833.  
  834. »COLOR QUICKDRAW RESOURCE FORMATS
  835. _______________________________________________________________________________
  836.  
  837. Several new resource types have been defined for use with Color QuickDraw. They
  838. are
  839.  
  840.   'crsr'    Color cursor resource type
  841.   'ppat'    Pixel Pattern resource type
  842.   'cicn'    Color Icon resource type
  843.   'clut'    Color Look-Up Table resource type
  844.  
  845. The precise formats of resources of these types are given below.
  846.  
  847. It is important to note that resources are used somewhat differently by Color QuickDraw.
  848. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  849. the same handle would be passed back to the application each time. With Color QuickDraw,
  850. the color cursor, icon, and pattern are compound structures, more complex than a
  851. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  852. then alters the copy before passing it to the application. Each time you call GetCCursor,
  853. you get a new copy of the cursor. This means that you should do one GetCCursor call
  854. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  855. should be marked as purgeable if you are concerned about memory space.
  856.  
  857. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  858. are measured from the beginning of the resource’s data.
  859.  
  860. »'ppat' (Pixel Pattern)
  861.  
  862.     PixPat record      {data structure describing pattern}
  863.         patType        [2 bytes] = 1 (full color pattern)
  864.         patMap         [4 bytes] = offset to pixMap record
  865.         patData        [4 bytes] = offset to pixel data
  866.         patXData       [4 bytes] = 0
  867.         patXValid      [2 bytes] = –1
  868.         patXMap        [4 bytes] = 0
  869.         pat1Data       [8 bytes] = 1 bit pattern data
  870.     PixMap             { pixMap describing pattern’s pixel image }
  871.         baseAddr       [4 bytes] = 0
  872.         rowBytes       [2 bytes] = rowBytes of image
  873.         bounds         [8 bytes] = boundary rectangle of image
  874.         pmVersion      [2 bytes] = 0
  875.         packType       [2 bytes] = 0
  876.         packSize       [4 bytes] = 0
  877.         hRes           [4 bytes] = $00480000
  878.         vRes           [4 bytes] = $00480000
  879.         pixelType      [2 bytes] = 0 = chunky
  880.         pixelSize      [2 bytes] = bits per pixel in image
  881.         cmpCount       [2 bytes] = 1
  882.         cmpSize        [2 bytes] = pixelsize
  883.         planeBytes     [4 bytes] = 0
  884.         pmTable        [4 bytes] = offset to color table data
  885.         pmReserved     [4 bytes] = 0
  886.     pixel data         [see below]        data for pattern
  887.     color table data   [see below]        data for color table
  888.  
  889. The patMap field of the pixPat record contains an offset to the pixMap record from
  890. the beginning of the resource data. The patData field of the pixPat record contains
  891. an offset to the pixel data from the beginning of the resource data. The pmTable
  892. field of the pixMap record contains an offset to the color table data from the beginning
  893. of the resource data. The size of the pixelData is calculated by subtracting the
  894. offset to the pixel data from the offset to the color table data.  The color table
  895. data consists of a color table record
  896. (ctSeed, ctFlags, ctSize) followed by ctSize+1 color table entries. Each entry in the
  897. color table connects a pixel value used in the pixel data to an actual RGB.
  898.  
  899. æKY SICN
  900. æC  /*----------------------------SICN • Small Icon-----------------------------------------*/
  901. type 'SICN' {
  902.      array {
  903.              hex string[32];                                 /* SICN data            */
  904.      };
  905. };
  906. æKY SIZE
  907. æC  /*----------------------------SIZE • MultiFinder Size Information-----------------------*/
  908. type 'SIZE' {
  909.      boolean                 dontSaveScreen,                 /* for SWITCHER         */
  910.                              saveScreen;                     /*    compatibility     */
  911.      boolean                 ignoreSuspendResumeEvents,      /* suspend-resume       */
  912.                              acceptSuspendResumeEvents;
  913.      boolean                 enableOptionSwitch,             /* for SWITCHER         */
  914.                              disableOptionSwitch;            /*    compatibility     */
  915.      boolean                 cannotBackground,
  916.                              canBackground;                  /* Can properly use back-
  917.                                                                 ground null events   */
  918.      boolean                 notMultiFinderAware,            /* activate/deactivate  */
  919.                              multiFinderAware;               /* on resume/suspend    */
  920.      boolean                 backgroundAndForeground,        /* Application does not */
  921.                              onlyBackground;                 /* have a user interface*/
  922.      boolean                 dontGetFrontClicks,             /* Get mouse down/up    */
  923.                              getFrontClicks;                 /* when suspended       */
  924.      boolean                 ignoreChildDiedEvents,          /* Apps use this.       */
  925.                              acceptChildDiedEvents;          /* Debuggers use this.  */
  926.      boolean                 not32BitCompatible,             /* Works with 24bit addr*/
  927.                              is32BitCompatible;              /* Works with 24 or 32  */
  928.                                                              /* bit addresses        */
  929. #undef reserved
  930.      boolean                 reserved;                       /* These seven bits are */      
  931.      boolean                 reserved;                       /* reserved.  Set them  */
  932.      boolean                 reserved;                       /* to "reserved". When  */
  933.      boolean                 reserved;                       /* we decide to define  */
  934.      boolean                 reserved;                       /* a new flag, your     */
  935.      boolean                 reserved;                       /* old resource will    */
  936.      boolean                 reserved;                       /* still compile.       */
  937.      
  938.      /* Memory sizes are in bytes */
  939.      unsigned longint;                                       /* preferred mem size   */
  940.      unsigned longint;                                       /* minimum mem size     */
  941.  
  942.      // If we ever define one of the seven reserved bits above, the "reserved"
  943.      // enumeration wouldn't appear on the newly defined bit.  By defining "reserved"
  944.      // below, old resource SIZE declarations will still compile.
  945. #define  reserved        false
  946. };
  947. æKY STR 
  948. æC  /*----------------------------STR  • Pascal-Style String--------------------------------*/
  949. type 'STR ' {
  950.      pstring;                                                /* String               */
  951. };
  952. æKY STR#
  953. æC  /*----------------------------STR# • Pascal-Style String List---------------------------*/
  954. type 'STR#' {
  955.      integer = $$Countof(StringArray);
  956.      array StringArray {
  957.              pstring;                                        /* String               */
  958.      };
  959. };
  960. æKY wctb
  961. æC  /*----------------------------wctb • Window Color Lookup Table--------------------------*/
  962. type 'wctb' as 'actb';
  963. æKY WIND
  964. æC  /*----------------------------WIND • Window Template------------------------------------*/
  965. type 'WIND' {
  966.      rect;                                                   /* boundsRect           */
  967.      integer         documentProc,                           /* procID               */
  968.                      dBoxProc,
  969.                      plainDBox,
  970.                      altDBoxProc,
  971.                      noGrowDocProc,
  972.                      zoomDocProc = 8,
  973.                      zoomNoGrow = 12,
  974.                      rDocProc = 16;
  975.      byte            invisible, visible;                     /* visible              */
  976.      fill byte;
  977.      byte            noGoAway, goAway;                       /* goAway               */
  978.      fill byte;
  979.      unsigned hex longint;                                   /* refCon               */
  980.      pstring         Untitled = "Untitled";                  /* title                */
  981. };
  982. æKY DRVR
  983. æC  /*----------------------------DRVR • Driver---------------------------------------------*/
  984. type 'DRVR' {
  985.      boolean = 0;
  986.      boolean         dontNeedLock, needLock;                 /* lock drvr in memory  */
  987.      boolean         dontNeedTime, needTime;                 /* for periodic action  */
  988.      boolean         dontNeedGoodbye, needGoodbye;           /* call before heap reinit*/
  989.      boolean         noStatusEnable, statusEnable;           /* responds to status   */
  990.      boolean         noCtlEnable, ctlEnable;                 /* responds to control  */
  991.      boolean         noWriteEnable, writeEnable;             /* responds to write    */
  992.      boolean         noReadEnable, readEnable;               /* responds to read     */
  993.      byte = 0;
  994.      integer;                                                /* driver delay         */
  995.      unsigned hex integer;                                   /* desk acc event mask  */
  996.      integer;                                                /* driver menu          */
  997.      unsigned hex integer;                                   /* offset to open       */
  998.      unsigned hex integer;                                   /* offset to prime      */
  999.      unsigned hex integer;                                   /* offset to control    */
  1000.      unsigned hex integer;                                   /* offset to status     */
  1001.      unsigned hex integer;                                   /* offset to close      */
  1002.      pstring;                                                /* driver name          */
  1003.      hex string;                                             /* driver code          */
  1004. };
  1005. æKY finf
  1006. æC  /*----------------------------finf • Font Family Description----------------------------*/
  1007. type 'finf' {
  1008.      integer = $$CountOf(Fonts);                             /* # of fonts           */
  1009.      array Fonts {
  1010.          integer;                                            /* Font Number          */
  1011.          unsigned hex integer    plain;                      /*      Font Style      */
  1012.          integer;                                            /*      Font Size       */
  1013.      };
  1014. };
  1015.  
  1016. æKY FOND
  1017. æC  /*----------------------------FOND • Font Family Description----------------------------*/
  1018. /* Note: this FOND resource definition only works when the tables at the end of the
  1019.       resource are in this order:    1 - Family Character-Width Table
  1020.                                      2 - Style Mapping Table
  1021.                                      3 - Kerning Tables
  1022. */
  1023. type 'FOND' {
  1024.      /* Flags Word */
  1025.      boolean     proportionalFont, fixedWidthFont;
  1026.      boolean     useFractWidthTable, dontUseFractWidthTable;
  1027.      boolean     computeFixedPointExtra, useIntegerExtra;
  1028.      boolean     useFractEnable, ignoreFractEnable;
  1029.      boolean     canAdjustCharSpacing, dontAdjustCharSpacing;
  1030.      unsigned hex bitstring[9] = 0;                          /* Reserved             */
  1031.      boolean     noCharWidthTable, hasCharWidthTable;
  1032.      boolean     noImageHeightTable, hasImageHeightTable;
  1033.  
  1034.      integer;                                                /* Family ID number     */
  1035.  First:
  1036.      integer;                                                /* first char           */
  1037.  Last:
  1038.      integer;                                                /* last char            */
  1039.      integer;                                                /* Ascent               */
  1040.      integer;                                                /* Descent              */
  1041.      integer;                                                /* Leading              */
  1042.      integer;                                                /* Width Max            */
  1043.  WidthOffset:
  1044.      unsigned hex longint = WidthTable[1] >> 3;              /* Width table offset   */
  1045.  KerningOffset:
  1046.      unsigned hex longint = KerningTable[1] >> 3;            /* Kerning table offset */
  1047.  StyleMapOffset:
  1048.      unsigned hex longint = StyleTable[1] >> 3;              /* Style map offset     */
  1049.      integer;                                                /* reserved             */
  1050.      integer;                                                /* ex wid bold          */
  1051.      integer;                                                /* ex wid italic        */
  1052.      integer;                                                /* ex wid underline     */
  1053.      integer;                                                /* ex wid outline       */
  1054.      integer;                                                /* ex wid shadow        */
  1055.      integer;                                                /* ex wid condensed     */
  1056.      integer;                                                /* ex wid extended      */
  1057.      integer;                                                /* reserved             */
  1058.      longint;                                                /* reserved for intl    */
  1059.  Version:
  1060.      integer;                                                /* version              */
  1061.  
  1062.      /* Font Association Table */
  1063.      integer = $$CountOf(FontEntries)-1;                     /* # of font entries    */
  1064.      wide array FontEntries {
  1065.          integer;                                            /* Font size            */
  1066.          integer;                                            /* Font style           */
  1067.          integer;                                            /* Resource ID of FONT  */
  1068.      };
  1069.      /*  */
  1070.      array [$$Word(Version) == 2] {
  1071.  OffsetTableStart:
  1072.          integer = $$CountOf(OffsetTable) - 1;
  1073.          array OffsetTable {
  1074.              longint = (BBoxStart[1] - OffsetTableStart[1]) >> 3;                
  1075.          };
  1076.          /* Font Bounding Box Table */
  1077.  BBoxStart:
  1078.          integer = $$CountOf(BBoxTable) - 1;
  1079.          wide array BBoxTable {
  1080.              fill bit[9];                                    /* Reserved             */
  1081.              Boolean     noExtendedStyle, EXTENDEDstyle;     /* Extended style       */
  1082.              Boolean     noCondensedStyle, CONDENSEDstyle;   /* Condensed style      */
  1083.              Boolean     noShadowStyle, SHADOWstyle;         /* Shadow style         */
  1084.              Boolean     noOutlineStyle, OUTLINEstyle;       /* Outline style        */
  1085.              Boolean     noUnderline, UNDERLINEstyle;        /* Underline style      */
  1086.              Boolean     noItalicStyle, ITALICstyle;         /* Italic style         */
  1087.              Boolean     noBoldStyle, BOLDstyle;             /* Bold style           */
  1088.              Rect;
  1089.          };
  1090.      };
  1091.  
  1092.      /* Family Character-Width Table */
  1093.      /* This outer array below handles the case when the width table offset (WidthOffset:)
  1094.         is zero. */
  1095.      array [$$Long(WidthOffset) != 0] {
  1096.  WidthTable:
  1097.          integer = $$CountOf(WidthTable) - 1;                /* # of width tables    */
  1098.          wide array WidthTable {
  1099.              fill bit[9];                                    /* Reserved             */
  1100.              Boolean     noExtendedStyle, EXTENDEDstyle;     /* Extended style       */
  1101.              Boolean     noCondensedStyle, CONDENSEDstyle;   /* Condensed style      */
  1102.              Boolean     noShadowStyle, SHADOWstyle;         /* Shadow style         */
  1103.              Boolean     noOutlineStyle, OUTLINEstyle;       /* Outline style        */
  1104.              Boolean     noUnderline, UNDERLINEstyle;        /* Underline style      */
  1105.              Boolean     noItalicStyle, ITALICstyle;         /* Italic style         */
  1106.              Boolean     noBoldStyle, BOLDstyle;             /* Bold style           */
  1107.              
  1108.              wide array [$$Word(Last) - $$Word(First) + 3] {
  1109.                  unsigned hex integer;                       /* Width of character   */
  1110.              };
  1111.          };
  1112.      };
  1113.  
  1114.      /* Style Mapping Table */
  1115.      /* This outer array below handles the case when the width table offset (WidthOffset:)
  1116.         is zero. */
  1117.      array [$$Long(StyleMapOffset) != 0] {
  1118.  StyleTable:
  1119.          unsigned hex integer;                               /* Font class           */
  1120.  CharCodeOffset:
  1121.          unsigned hex longint =                              /* Encoding table offset*/
  1122.              (CharCodeTable[1,1] - StyleTable[1]) / 8 * (CharCodeTable[1,1] != 0);
  1123.          fill long;                                          /* Reserved             */
  1124.          array [48] {
  1125.              byte;
  1126.          };
  1127.          /* Style Name Table */
  1128.          integer = $$CountOf(StyleNames);                    /* Number of strings    */
  1129.          pstring;                                            /* Full base font name  */
  1130.          array StyleNames {
  1131.              pstring;                                        /* Style suffix names   */
  1132.          };
  1133.          
  1134.          /* Character Set Encoding Table */
  1135.          /* This outer array below handles the case when the character set encoding
  1136.             offset is zero (CharCodeOffset:) */
  1137.          array [$$Long(CharCodeOffset[1]) != 0] {
  1138.  CharCodeTable:
  1139.              integer = $$CountOf(CharacterCodes);            /* Number of entries    */
  1140.              wide array CharacterCodes {
  1141.                  char;                                       /* Character code       */
  1142.                  pstring;                                    /* Char name string     */
  1143.              };
  1144.          };
  1145.      };
  1146.  
  1147.      /* Kerning Tables */
  1148.      /* This outer array below handles the case when the kerning table offset
  1149.         (KerningOffset:) is zero. */
  1150.      array [$$Long(KerningOffset) != 0] {
  1151.          /* Kerning Tables */
  1152.  KerningTable:
  1153.          integer = $$CountOf(KerningTables) - 1;             /* Number of tables     */
  1154.          wide array KerningTables {
  1155.              fill bit[9];                                    /* Reserved             */
  1156.              Boolean     noExtendedStyle, EXTENDEDstyle;     /* Extended style       */
  1157.              Boolean     noCondensedStyle, CONDENSEDstyle;   /* Condensed style      */
  1158.              Boolean     noShadowStyle, SHADOWstyle;         /* Shadow style         */
  1159.              Boolean     noOutlineStyle, OUTLINEstyle;       /* Outline style        */
  1160.              Boolean     noUnderline, UNDERLINEstyle;        /* Underline style      */
  1161.              Boolean     noItalicStyle, ITALICstyle;         /* Italic style         */
  1162.              Boolean     noBoldStyle, BOLDstyle;             /* Bold style           */
  1163.              integer = $$CountOf(KerningTableEntry);         /* # of entries         */
  1164.              wide array KerningTableEntry {
  1165.                  char;                                       /* first char of pair   */
  1166.                  char;                                       /* second char of pair  */
  1167.                  unsigned hex integer;                       /* kerning offset       */
  1168.              };
  1169.          };
  1170.      };
  1171. };
  1172. _______________________________________________________________________________
  1173.  
  1174. »FONTS AND THEIR FAMILIES
  1175. _______________________________________________________________________________
  1176.  
  1177. Note:  The extensions to the Font Manager described in the following section
  1178.        were originally documented in Inside Macintosh, Volume IV.  As such,
  1179.        this information refers to the 128K ROMs and System file version 3.2
  1180.        and later.
  1181.  
  1182. In the 64K ROM version of the Font Manager, font is defined as the complete set of
  1183. characters of one typeface; it doesn’t include the size of the characters, and usually
  1184. doesn’t include any stylistic variations. In other words, fonts are defined in the
  1185. plain style and stylistic variations, such as bold and italic, are applied to them.
  1186. For example, Times plain (or roman) defines the font, while Times italic is a stylistic
  1187. variation applied to that font.
  1188.  
  1189. In the 128K ROM version, the definition of a font is broadened to include stylistic
  1190. variations. That is, a separate font can be defined for certain stylistic variations
  1191. of a typeface. The set of available fonts for a given typeface is known as a font
  1192. family.
  1193.  
  1194. This allows QuickDraw to use an actual font instead of modifying a plain font, thereby
  1195. improving speed and readability. For example, suppose the user of a word processor
  1196. selects a phrase in 12-point Times Roman and chooses the italic style from a menu.
  1197. QuickDraw asks for an italic Times and, assuming that the proper resources are available,
  1198. the Font Manager returns a 12-point Times Italic font. QuickDraw could then draw the
  1199. phrase from an actual italic font rather than having to slant the plain font.
  1200.  
  1201. Note:  The standard stylistic variations will still be performed by
  1202.        QuickDraw when they’re not available as actual fonts.
  1203.  
  1204. Information about fonts and their families is stored as resources in resource files;
  1205. the Font Manager calls the Resource Manager to read them into memory. Fonts are
  1206. stored as resources of type 'FONT' or 'NFNT'. Fonts known to the system are stored in
  1207. the system resource file; you may also define your own fonts and include them in your
  1208. application’s resource file. The information about a font family is stored as a
  1209. resource of type 'FOND'; this includes the resource IDs of all the fonts in the
  1210. family, as shown in Figure 2.
  1211.  
  1212. •••Refer to Figure 2.•••
  1213.  
  1214. Figure 2–Font Manager Resources
  1215.  
  1216. •••Refer to Technical Note #198:•••
  1217.  
  1218. The 'NFNT' resource is new to the 128K ROM version of the Font Manager; it has the
  1219. same format as the 'FONT' resource and allows for many more fonts. An 'NFNT' resource
  1220. type can also be used to mask all but plain fonts from appearing in a font menu. In
  1221. this way, the system resource file can contain Times, Times Italic, Times Bold, and
  1222. Times Bold Italic, yet only Times will appear on the Font Menu. (The user would need
  1223. to choose Italic from the Style menu.)
  1224.  
  1225. The 64K ROM can only handle 'FONT' resources; it ignores resources of type
  1226. 'NFNT' and 'FOND'.
  1227.  
  1228. Warning:  If you’re creating a font, be sure to read the section
  1229.           “Restrictions on the 'FONT' type” below for information
  1230.           on maintaining compatibility with the 64K ROMs.
  1231.  
  1232. It’s crucial that all new fonts have a corresponding 'FOND' resource. A minimal
  1233. 'FOND' resource can be made for a font by using the Font/DA Mover (version 3.0 or
  1234. later) to copy the font into a different file that has no font with the same name.
  1235.  
  1236. Note:  A 'FOND' resource created this way does not contain any optional
  1237.        tables, but it does contain the font association table (described
  1238.        below) that maps family numbers and font sizes into resource IDs.
  1239.  
  1240. Warning:  Be aware that when a 'FOND' is present, the Font Manager uses
  1241.           it exclusively to determine which fonts are available. Fonts
  1242.           should be added to or deleted from the System file with a tool
  1243.           like the Font/DA Mover, which correctly updates the 'FOND' as
  1244.           well as the 'FONT'.
  1245.  
  1246. The Font Manager uses these resources to build two data structures in the application
  1247. heap. The font record contains information about a font and the family record contains
  1248. information about a font family.
  1249.  
  1250. »Restrictions on the 'FONT' Type
  1251.  
  1252. For backward compatibility, all 'FONT' resources that are part of a 'FOND' have
  1253. certain restrictions:
  1254.  
  1255.   1.  The font name and family name must be identical.
  1256.   2.  The font number and family number must be identical since the
  1257.       Font Manager interprets a family number as a font number.
  1258.   3.  The resource ID of the font must be the same number that would
  1259.       be produced by concatenating the font number and the font size.
  1260.  
  1261. These restrictions ensure that both the 64K ROM and 128K ROM versions of the Font
  1262. Manager will associate the family number and point size with the proper corresponding
  1263. font resource ID, whether or not there’s a family resource. 'NFNT' resources are not
  1264. bound by these restrictions (but neither will they be found by the 64K ROM version of
  1265. the Font Manager).
  1266.  
  1267. æKY FONT
  1268. æC  /*----------------------------FONT • Font Description-----------------------------------*/
  1269. /* PROBLEMS: the offset to the offset/width table has been changed to a longint, with the
  1270.           high word stored in the neg descent field (if its not -1).  Rez can't handle
  1271.           this. */
  1272. type 'FONT' {    
  1273.      /* Font Type Flags */
  1274. FontType:
  1275.      boolean = 1;                                            /* Reserved             */
  1276.      boolean     doExpandFont, dontExpandFont;
  1277.      boolean     proportionalFont, fixedWidthFont;
  1278.      boolean = 1;                                            /* Reserved             */
  1279.      unsigned bitstring[2] = 0;                              /* Reserved             */
  1280.      boolean     blackFont, colorFont;
  1281.      boolean     notSynthetic, isSynthetic;
  1282.      boolean     nofctbRsrc, hasfctbRsrc;
  1283.      unsigned bitstring[3] = 0;                              /* Reserved             */
  1284.      unsigned bitstring[2]   oneBit, twoBit,                 /* Font depth           */
  1285.                              fourBit, eightBit;
  1286.      boolean     noCharWidthTable, hasCharWidthTable;
  1287.      boolean     noImageHeightTable, hasImageHeightTable;
  1288.  
  1289.  FirstChar:
  1290.      integer;                                                /* first char           */
  1291.  LastChar:
  1292.      integer;                                                /* last char            */
  1293.      integer;                                                /* width max            */
  1294.      integer;                                                /* kern max             */
  1295.      integer;                                                /* neg descent          */
  1296.      integer;                                                /* font rect width      */
  1297.  Height:
  1298.      integer;                                                /* font rect height     */
  1299.  Offset:
  1300.      unsigned integer = ((WidthTable-Offset)/16);            /* offset to off/wid tab*/      
  1301.      integer;                                                /* ascent               */
  1302.      integer;                                                /* descent              */
  1303.      integer;                                                /* leading              */
  1304.  RowWords:
  1305.      integer;                                                /* row width (in words) */
  1306.      
  1307.      /* Tables */
  1308.      /* Bit image */
  1309.      hex string [($$Word(RowWords) <<($$BitField(FontType, 12, 2)
  1310.          & 3) + 1) * $$Word(Height)];
  1311.  
  1312.      /* Location Table */
  1313.      array [$$Word(LastChar) - $$Word(FirstChar) + 3] {
  1314.          integer;
  1315.      };
  1316.      
  1317.      /* Offset/Width Table */
  1318.  WidthTable:
  1319.      array [$$Word(LastChar) - $$Word(FirstChar) + 3] {
  1320.          integer;
  1321.      };
  1322. };
  1323. _______________________________________________________________________________
  1324.  
  1325. »FONTS AND THEIR FAMILIES
  1326. _______________________________________________________________________________
  1327.  
  1328. Note:  The extensions to the Font Manager described in the following section
  1329.        were originally documented in Inside Macintosh, Volume IV.  As such,
  1330.        this information refers to the 128K ROMs and System file version 3.2
  1331.        and later.
  1332.  
  1333. In the 64K ROM version of the Font Manager, font is defined as the complete set of
  1334. characters of one typeface; it doesn’t include the size of the characters, and usually
  1335. doesn’t include any stylistic variations. In other words, fonts are defined in the
  1336. plain style and stylistic variations, such as bold and italic, are applied to them.
  1337. For example, Times plain (or roman) defines the font, while Times italic is a stylistic
  1338. variation applied to that font.
  1339.  
  1340. In the 128K ROM version, the definition of a font is broadened to include stylistic
  1341. variations. That is, a separate font can be defined for certain stylistic variations
  1342. of a typeface. The set of available fonts for a given typeface is known as a font
  1343. family.
  1344.  
  1345. This allows QuickDraw to use an actual font instead of modifying a plain font, thereby
  1346. improving speed and readability. For example, suppose the user of a word processor
  1347. selects a phrase in 12-point Times Roman and chooses the italic style from a menu.
  1348. QuickDraw asks for an italic Times and, assuming that the proper resources are available,
  1349. the Font Manager returns a 12-point Times Italic font. QuickDraw could then draw the
  1350. phrase from an actual italic font rather than having to slant the plain font.
  1351.  
  1352. Note:  The standard stylistic variations will still be performed by
  1353.        QuickDraw when they’re not available as actual fonts.
  1354.  
  1355. Information about fonts and their families is stored as resources in resource files;
  1356. the Font Manager calls the Resource Manager to read them into memory. Fonts are
  1357. stored as resources of type 'FONT' or 'NFNT'. Fonts known to the system are stored in
  1358. the system resource file; you may also define your own fonts and include them in your
  1359. application’s resource file. The information about a font family is stored as a
  1360. resource of type 'FOND'; this includes the resource IDs of all the fonts in the
  1361. family, as shown in Figure 2.
  1362.  
  1363. •••Refer to Figure 2.•••
  1364.  
  1365. Figure 2–Font Manager Resources
  1366.  
  1367. •••Refer to Technical Note #198:•••
  1368.  
  1369. The 'NFNT' resource is new to the 128K ROM version of the Font Manager; it has the
  1370. same format as the 'FONT' resource and allows for many more fonts. An 'NFNT' resource
  1371. type can also be used to mask all but plain fonts from appearing in a font menu. In
  1372. this way, the system resource file can contain Times, Times Italic, Times Bold, and
  1373. Times Bold Italic, yet only Times will appear on the Font Menu. (The user would need
  1374. to choose Italic from the Style menu.)
  1375.  
  1376. The 64K ROM can only handle 'FONT' resources; it ignores resources of type
  1377. 'NFNT' and 'FOND'.
  1378.  
  1379. Warning:  If you’re creating a font, be sure to read the section
  1380.           “Restrictions on the 'FONT' type” below for information
  1381.           on maintaining compatibility with the 64K ROMs.
  1382.  
  1383. It’s crucial that all new fonts have a corresponding 'FOND' resource. A minimal
  1384. 'FOND' resource can be made for a font by using the Font/DA Mover (version 3.0 or
  1385. later) to copy the font into a different file that has no font with the same name.
  1386.  
  1387. Note:  A 'FOND' resource created this way does not contain any optional
  1388.        tables, but it does contain the font association table (described
  1389.        below) that maps family numbers and font sizes into resource IDs.
  1390.  
  1391. Warning:  Be aware that when a 'FOND' is present, the Font Manager uses
  1392.           it exclusively to determine which fonts are available. Fonts
  1393.           should be added to or deleted from the System file with a tool
  1394.           like the Font/DA Mover, which correctly updates the 'FOND' as
  1395.           well as the 'FONT'.
  1396.  
  1397. The Font Manager uses these resources to build two data structures in the application
  1398. heap. The font record contains information about a font and the family record contains
  1399. information about a font family.
  1400.  
  1401. »Restrictions on the 'FONT' Type
  1402.  
  1403. For backward compatibility, all 'FONT' resources that are part of a 'FOND' have
  1404. certain restrictions:
  1405.  
  1406.   1.  The font name and family name must be identical.
  1407.   2.  The font number and family number must be identical since the
  1408.       Font Manager interprets a family number as a font number.
  1409.   3.  The resource ID of the font must be the same number that would
  1410.       be produced by concatenating the font number and the font size.
  1411.  
  1412. These restrictions ensure that both the 64K ROM and 128K ROM versions of the Font
  1413. Manager will associate the family number and point size with the proper corresponding
  1414. font resource ID, whether or not there’s a family resource. 'NFNT' resources are not
  1415. bound by these restrictions (but neither will they be found by the 64K ROM version of
  1416. the Font Manager).
  1417.  
  1418. æKY FWID
  1419. æC  /*----------------------------FWID • Font Width Table-----------------------------------*/
  1420. type 'FWID' {
  1421.      unsigned hex integer;                                   /* Font type            */
  1422.      integer;                                                /* first char           */
  1423.      integer;                                                /* last char            */
  1424.      integer;                                                /* width max            */
  1425.      integer;                                                /* kern max             */
  1426.      integer;                                                /* neg descent          */
  1427.      integer;                                                /* font rect width      */
  1428.      integer;                                                /* font rect height     */
  1429.      unsigned hex integer;                                   /* offset to off/wid tab*/
  1430.      integer;                                                /* ascent               */
  1431.      integer;                                                /* descent              */
  1432.      integer;                                                /* leading              */
  1433.      integer;                                                /* row width (in words) */
  1434.      wide array {                                            /* offset/width table   */
  1435.          byte;                                               /* char offset          */
  1436.          byte;                                               /* char width           */
  1437.      };
  1438. };
  1439.  
  1440. A resource type can be defined that consists of only the character widths and general
  1441. font information—everything but the font’s bit image and location table. If this
  1442. 'FWID' resource type exists, it will be read in whenever QuickDraw doesn’t need to
  1443. draw the text, such as when you call one of the routines CharWidth, HidePen, or
  1444. OpenPicture (which calls HidePen). The FontRec data type described above, minus the
  1445. rowWords, bitImage, and locTable fields, reflects the structure of the 'FWID' resource
  1446. type. The owTLoc field will contain 4, and the fontType field will contain the following
  1447. predefined constant:
  1448.  
  1449. CONST fontWid = $ACB0; {font width data}
  1450.  
  1451. Note:  The extensions to the Font Manager described in the following paragraphs
  1452.        were originally documented in Inside Macintosh, Volume IV.  As such,
  1453.        this information refers to the 128K ROMs and System file version 3.2
  1454.        and later.
  1455.  
  1456. To maintain compatibility with existing applications, the order of the fields in the
  1457. font record remains unchanged; two variable-length arrays are added at the end of the
  1458. record, however, to implement fractional character widths.
  1459.  
  1460.   Number of bytes    Contents
  1461.  
  1462.       m bytes        Optional character-width table of font
  1463.                          m = 2 * (lastChar–firstChar+3)
  1464.       m bytes        Optional image-height table of font
  1465.                          m = 2 * (lastChar–firstChar+3)
  1466.  
  1467. The various sizes of a font are each stored as separate resources. The resource type
  1468. for a font is either 'FONT' or 'NFNT', which is simply the original font record with
  1469. the two additional variable-length arrays added at the end of the record.
  1470.  
  1471. Additional constants have been defined for use in the fontType field; it can now
  1472. contain any of the following values:
  1473.  
  1474. CONST  propFont   = $9000;    {proportional font}
  1475.        prpFntH    = $9001;    { with height table}
  1476.        prpFntW    = $9002;    { with width table}
  1477.        prpFntHW   = $9003;    { with height & width tables}
  1478.  
  1479.        fixedFont  = $B000;    {fixed-width font}
  1480.        fxdFntH    = $B001;    { with height table}
  1481.        fxdFntW    = $B002;    { with width table}
  1482.        fxdFntHW   = $B003;    { with height & width tables}
  1483.  
  1484.        fontWid    = $ACB0;    {font width data:  64K ROM only}
  1485.  
  1486. The low-order two bits of the fontType field tell whether the two optional tables are
  1487. present. If bit 0 is set, there’s an image-height table; if bit 1 is set, there’s a
  1488. character width table.
  1489.  
  1490. The optional character-width table immediately follows the offset/width table; it’s a
  1491. variable-length array specifying the fixed-point character widths for each character
  1492. in the font. Each entry is a word in length. For compactness, a special 16-bit fixed-point
  1493. format is used with an unsigned integer part in the high-order byte and a fractional
  1494. part in the low-order byte.
  1495.  
  1496. •••Refer to Technical Note #30:•••
  1497.  
  1498. The optional image-height table, which speeds the drawing of characters, may also be
  1499. appended after the character-width table; it’s a variable-length array specifying the
  1500. image height of each character in the font. Each entry is a word in length; the
  1501. high-order byte is the offset of the first non-white row in the character; the low-order
  1502. byte is the number of rows that must be drawn. The image height is the height of the
  1503. character image and is less than or equal to the font height; it’s used in conjunction
  1504. with QuickDraw for improved character plotting. Most font resources don’t contain
  1505. this table; it’s typically generated by the Font Manager when the font is swapped
  1506. in.
  1507.  
  1508. Note:  The 64K ROM version of the Resource Manager limits the total space
  1509.        occupied by the bit image, location table, offset/width table, and
  1510.        character-width and image-height tables to 32K bytes. For this reason,
  1511.        the practical limit on the font size of a full font is about 40 points.
  1512.  
  1513. Note:  The extensions to the Font Manager described in the following paragraphs
  1514.        were originally documented in Inside Macintosh, Volume V.  As such,
  1515.        this information refers to the Macintosh SE and Macintosh II ROMs and
  1516.        System file version 4.1 and later.
  1517.  
  1518. Several previously unused bits of the fontType field specify the font depth and other
  1519. related information (the new bits are marked by an asterisk):
  1520.  
  1521.   Bit    Meaning
  1522.  
  1523.   0      Set if there’s an image-height table
  1524.   1      Set if there’s a character-width table
  1525. * 2–3    Font depth (Macintosh II only—must be 0 otherwise)
  1526.   4–6    Reserved (should be 0)
  1527. * 7      Set if font has an 'fctb' resource (Macintosh II
  1528.          only—must be 0 otherwise)
  1529. * 8      Set if a synthetic font (Macintosh II only—must be 0 otherwise)
  1530. * 9      Set if font contains colors other than black (Macintosh II
  1531.          only—must be 0 otherwise)
  1532.   10–11  Reserved (should be 0)
  1533.   12     Reserved (should be 1)
  1534.   13     Set for fixed-width font, clear for proportional font
  1535. * 14     Set if font is not to be expanded (Macintosh II
  1536.          only—must be 0 otherwise)
  1537.   15     Reserved (should be 1)
  1538.  
  1539. Bit 2 and 3 specify the font depth and can contain the following values:
  1540.  
  1541.   Value    Font depth
  1542.     0      1-bit
  1543.     1      2-bit
  1544.     2      4-bit
  1545.     3      8-bit
  1546.  
  1547. The font depth is normally 0, indicating a font intended for a screen one bit deep. 
  1548. If bit 7 is set (and the font is an 'NFNT' resource), a resource of type 'fctb' with
  1549. the same ID as the font can optionally be provided to assign RGB colors to specific
  1550. pixel values.
  1551.  
  1552. Bit 8 is used only by the Font Manager to indicate a synthetic font, created dynamically
  1553. from the available font resources in response to a certain color and screen depth
  1554. combination.
  1555.  
  1556. Bit 9 is set if the font contains other than black.
  1557.  
  1558. Setting bit 14 indicates that the font should not be expanded by the Font Manager to
  1559. match the screen depth; some international fonts, such as kanji, are too large for
  1560. synthetic fonts to be effective or meaningful.
  1561.  
  1562. To accommodate multibit font depths, the owTLoc field has been changed to a long
  1563. word, the nDescent field becoming the high-order word.  (For backward compatibility,
  1564. nDescent is ignored if it’s negative.)
  1565.  
  1566. Note:  The 128K ROM version of the Font Manager limits the strike for a
  1567.        1-bit font to not quite 128K; this limits the largest practical
  1568.        font to about 127 points.  The Macintosh II ROM limits the largest
  1569.        practical font to about 255 points, regardless of the font depth.
  1570.  
  1571. æKY insc
  1572. æC  /*----------------------------insc • Installer Script-----------------------------------*/
  1573. #define  CommFlags                                                                          \
  1574.      boolean     noDelRemove, delRemove;             /* Remove file if remove clicked*/ \
  1575.      boolean     noDelInstall, delInstall;           /* Delete target before copy    */ \
  1576.      boolean     noCopy, copy;                       /* Copy file to destination     */ \
  1577.      fill bit[3];                                    /* Reserved                     */ \
  1578.      boolean     doReplace, dontReplace;             /* Replace                      */ \
  1579.      fill bit[1];                                    /* Reserved                     */ \
  1580.      boolean     old, noOld;                         /* Type & creator need not match*/ \
  1581.      boolean     noUpdateOnly, updateOnly            /* Only update if target exists */
  1582.  
  1583. #define  FileSpecFlags                                                                      \
  1584.      CommFlags;                                                                         \
  1585.      boolean     noRsrcFork, rsrcFork;               /* Apply operation to rsrc fork */ \
  1586.      boolean     noDataFork, dataFork;               /* Apply operation to data fork */ \
  1587.      boolean     needExist, needNotExist;            /* File need not exist          */ \
  1588.      boolean     noCrDate, crDate;                   /* Creation date must match     */ \
  1589.      boolean     noTypeCr, typeCr;                   /* Type and creator must match  */ \
  1590.      bitstring[1] = 1                                /* Indicates file specification */
  1591.  
  1592. #define  RsrcSpecFlags                                                                      \
  1593.      CommFlags;                                                                         \
  1594.      fill bit;                                       /* Reserved                     */ \
  1595.      boolean     noEvenIf, evenIf;                   /* Do it even if rsrc protected */ \
  1596.      boolean     needExist, needNotExist;            /* Rsrc need not exist          */ \
  1597.      fill bit;                                       /* Reserved                     */ \
  1598.      boolean noByID, byID;                           /* Use name or id to find rsrc  */ \
  1599.      bitstring[1] = 0                                /* Indicates rsrc specification */
  1600.  
  1601. #define  FileSpec                                                                           \
  1602.      FileSpecFlags;                                  /* FileSpec Flags               */ \
  1603.      literal longint;                                /* File Type                    */ \
  1604.      literal longint;                                /* File Creator                 */ \
  1605.      unsigned hex longint;                           /* Creation Date, use              \
  1606.                                                         $$DateToLongInt() to read in    \
  1607.                                                         the date.                    */ \
  1608.      fill long[3];                                   /* Handle, FDelSize, FAddSize   */ \
  1609.      pstring;                                        /* File Name                    */ \
  1610.      align word
  1611.  
  1612. type 'insc' {
  1613.      switch {
  1614.          case format0:
  1615.              key integer = 0;                                /* Script Format        */
  1616.              hex integer = 0;                                /* Script Flags         */
  1617.              pstring;                                        /* Script Name          */
  1618.              align word;
  1619.              wstring;                                        /* Script Help          */
  1620.              align word;
  1621.              unsigned integer = $$CountOf(FileList);         /* File List            */
  1622.              wide array FileList {
  1623.                  FileSpec;                                   /* File Spec            */
  1624.              };
  1625.              unsigned integer = $$CountOf(ResFileList);      /* Resource File List   */
  1626.              wide array ResFileList {
  1627.                  FileSpec;                                   /* Target File Spec     */
  1628.                  integer = $$CountOf(SrcFileList);           /* Source File List     */
  1629.                  wide array SrcFileList {
  1630.                      FileSpec;                               /* Source File Spec     */
  1631.                      unsigned integer = $$CountOf(ResList);  /* Resource List        */
  1632.                      wide array ResList {
  1633.                          RsrcSpecFlags;                      /* Resource Spec Flags  */
  1634.                          literal longint;                    /* Resource Type        */
  1635.                          integer;                            /* Source ID            */
  1636.                          integer;                            /* Target ID            */
  1637.                          fill word[2];                       /* CRC/Version, Filler1 */
  1638.                          fill long[3];                       /* Filler2, RDelSize,
  1639.                                                                  RAddSize            */
  1640.                          pstring;                            /* Resource Name        */
  1641.                          align word;
  1642.                          integer = 0;                        /* Previous CRC List    */
  1643.                      };
  1644.                  };
  1645.              };
  1646.              integer = 0;                                    /* Disk Blocks          */
  1647.  
  1648.          case format1:
  1649.              key integer = 1;                                /* Script Format        */
  1650.              hex integer = 0;                                /* Script Flags         */
  1651.              pstring;                                        /* Script Name          */
  1652.              align word;
  1653.              wstring;                                        /* Script Help          */
  1654.              align word;
  1655.              unsigned integer = $$CountOf(FileList);         /* File List            */
  1656.              wide array FileList {
  1657.                  FileSpec;                                   /* File Spec            */
  1658.              };
  1659.              unsigned integer = $$CountOf(ResFileList);      /* Resource File List   */
  1660.              wide array ResFileList {
  1661.                  FileSpec;                                   /* Target File Spec     */
  1662.                  integer = $$CountOf(SrcFileList);           /* Source File List     */
  1663.                  wide array SrcFileList {
  1664.                      FileSpec;                               /* Source File Spec     */
  1665.                      unsigned integer = $$CountOf(ResList);  /* Resource List        */
  1666.                      wide array ResList {
  1667.                          RsrcSpecFlags;                      /* Resource Spec Flags  */
  1668.                          literal longint;                    /* Resource Type        */
  1669.                          integer;                            /* Source ID            */
  1670.                          integer;                            /* Target ID            */
  1671.                          fill word[2];                       /* CRC/Version, Filler1 */
  1672.                          fill long[3];                       /* Filler2, RDelSize,
  1673.                                                                 RAddSize             */
  1674.                          pstring;                            /* Resource Name        */
  1675.                          align word;
  1676.                          integer = 0;                        /* Previous CRC List    */
  1677.                      };
  1678.                  };
  1679.              };
  1680.              unsigned integer;                               /* Boot Block Version   */
  1681.              unsigned integer;                               /* Number of Open Files */
  1682.              unsigned integer;                               /* Number of Events     */
  1683.              unsigned hex longint;                           /* Sys Heap Size 128K   */
  1684.              unsigned hex longint;                           /* Sys Heap Size 256K   */
  1685.              unsigned hex longint;                           /* Sys Heap Size 512K   */
  1686.        };
  1687. };
  1688. æKY INTL0
  1689. æC  /*----------------------------INTL (0) • International Formatting Information-----------*/
  1690. type 'INTL' (0) {
  1691.      char        period = periodSymbol;                      /* decimal pt sep       */
  1692.      char        comma = commaSymbol;                        /* thousands sep        */
  1693.      char        semicolon = semicolonSymbol;                /* list sep             */
  1694.      char        dollarsign = dollarsignSymbol;              /* currSym1             */
  1695.      char;                                                   /* currSym2             */
  1696.      char;                                                   /* currSym3             */
  1697.  
  1698.      /* currFmt */
  1699.      boolean     noLeadZero, leadingZero;                    /* leading unit zero    */
  1700.      boolean     noTrailingZero, trailingZero;               /* trailing dec zero    */
  1701.      boolean     paren, minusSign;                           /* negative rep         */
  1702.      boolean     trails, leads;                              /* curr sym position    */
  1703.      fill bit[4];                                            /* not used             */
  1704.      byte        monDayYear, dayMonYear, yearMonDay;         /* dateOrder            */
  1705.  
  1706.      /* shrtDateFmt */
  1707.      boolean     noCentury, century;                         /* century incl         */
  1708.      boolean     noMonthLeadZero, monthLeadZero;             /* mon lead zero        */
  1709.      boolean     noDayLeadZero, dayLeadZero;                 /* day lead zero        */
  1710.      fill bit[5];                                            /* filler               */
  1711.      char        slash = slashSymbol;                        /* date sep             */
  1712.      byte        twentyFourHour, twelveHour = 255;           /* timeCycle            */
  1713.  
  1714.      /* timeFmt */
  1715.      boolean     noHoursLeadZero, hoursLeadZero;             /* hours lead zero      */
  1716.      boolean     noMinutesLeadZero, minutesLeadZero;         /* min lead zero        */
  1717.      boolean     noSecondsLeadZero, secondsLeadZero;         /* sec lead zero        */
  1718.      fill bit[5];                                            /* filler               */
  1719.      string[4];                                              /* mornStr              */
  1720.      string[4];                                              /* eveStr               */
  1721.      char;                                                   /* timeSep              */
  1722.      char;                                                   /* time1Stuff           */
  1723.      char;                                                   /* time2Stuff           */
  1724.      char;                                                   /* time3Stuff           */
  1725.      char;                                                   /* time4Stuff           */
  1726.      char;                                                   /* time5Stuff           */
  1727.      char;                                                   /* time6Stuff           */
  1728.      char;                                                   /* time7Stuff           */
  1729.      char;                                                   /* time8Stuff           */
  1730.      byte        standard, metric = 255;                     /* metricSys            */
  1731.      byte        Country;                                    /* INTL0 country        */
  1732.      byte;                                                   /* version              */
  1733. };
  1734. æKY itl0
  1735. æC  /*----------------------------itl0 • International Formatting Information---------------*/
  1736. type 'itl0' as 'INTL' (0);
  1737. æKY INTL1
  1738. æC  /*----------------------------INTL (1) • International Date/Time Information------------*/
  1739. type 'INTL' (1) {            
  1740.      /* Day names */
  1741.      array [7] {
  1742.          pstring[15];                                        /* Sunday, Monday...    */                  
  1743.      };
  1744.      
  1745.      /* Month names */
  1746.      array [12] {
  1747.          pstring[15];                                        /* January, February... */                      
  1748.      };
  1749.  
  1750.      byte        dayName, none=255;                          /* suppressDay          */
  1751.      byte        dayMonYear, monDayYear = 255;               /* longDate format      */
  1752.      byte        noDayLeadZero, dayLeadZero = 255;           /* dayLeading0          */
  1753.      byte;                                                   /* abbrLen              */
  1754.      string[4];                                              /* st0                  */
  1755.      string[4];                                              /* st1                  */
  1756.      string[4];                                              /* st2                  */
  1757.      string[4];                                              /* st3                  */
  1758.      string[4];                                              /* st4                  */
  1759.      byte        Country;                                    /* INTL1 country        */
  1760.      byte;                                                   /* version              */
  1761.      hex string  DefaultReturn = "\$4E\$75";                 /* local routine - If
  1762.                                                                 you have one, use 
  1763.                                                                 $$Resource to insert
  1764.                                                                 code here.  Otherwise,
  1765.                                                                 you must have a 68000
  1766.                                                                 return instruction.
  1767.                                                                 Use DefaultReturn.   */
  1768. };
  1769. æKY itl1
  1770. æC  /*----------------------------itl1 • International Date/Time Information----------------*/
  1771. type 'itl1' as 'INTL' (1);
  1772. æKY itl2
  1773. æC  /*----------------------------itl2 • International String Comparision Package Hooks-----*/
  1774. type 'itl2' {
  1775. /*
  1776.  * The type definition for 'itl2' changed between systems 6.0.3 and 6.0.4.
  1777.  * If the fourth integer of this type is -1, the resource is of the new type.
  1778.  * There's no clean way to merge both definitions into one type that Rez and
  1779.  * DeRez could handle.  If you're trying to create or decompile a pre-6.0.4
  1780.  * 'itl2' resource, add -d SYSTEMVERSION=0x060003 to your Rez or DeRez command.
  1781.  */
  1782. #ifndef SYSTEMVERSION
  1783.  #define SYSTEMVERSION 0x060004  // version 6.0.4
  1784. #endif
  1785. #if SYSTEMVERSION >= 0x060004
  1786.      unsigned integer = initHookOffset >> 3;             /* init hook offset         */
  1787.      unsigned integer = fetchHookOffset >> 3;            /* fetch hook offset        */
  1788.      unsigned integer = vernierHookOffset >> 3;          /* vernier hook offset      */
  1789.      unsigned integer = projectHookOffset >> 3;          /* project hook offset      */
  1790.      integer = -1;                                       /* MODIFIED format flag     */
  1791.      unsigned integer = rsvd2HookOffset >> 3;            /* rsvd2 hook offset        */
  1792.  
  1793.      /* new offsets, for new tables */
  1794.      unsigned integer = typeListOffset >> 3;             /* TypeList offset          */
  1795.      unsigned integer = classArrayOffset >> 3;           /* ClassArray offset        */
  1796.      unsigned integer = upperListOffset >> 3;            /* UpperList offset         */
  1797.      unsigned integer = lowerListOffset >> 3;            /* LowerList offset         */
  1798.      unsigned integer = upperNoMarkListOffset >> 3;      /* UpperNoMarkList offset   */
  1799.      unsigned integer = wordTableOffset >> 3;            /* WordTable offset         */
  1800.      unsigned integer = wrapTableOffset >> 3;            /* WrapTable offset         */
  1801.      unsigned integer = noMarkListOffset >> 3;           /* NoMarkList offset        */
  1802.      unsigned hex integer;                               /* version number           */
  1803.      unsigned integer;                                   /* reserved                 */
  1804.  
  1805.      /* the current routines */
  1806. initHookOffset:
  1807.      hex string [(fetchHookOffset - initHookOffset) >> 3];           /* code */
  1808. fetchHookOffset:
  1809.      hex string [(vernierHookOffset - fetchHookOffset) >> 3];        /* code */
  1810. vernierHookOffset:
  1811.      hex string [(projectHookOffset - vernierHookOffset) >> 3];      /* code */
  1812. projectHookOffset:
  1813.      hex string [(rsvd2HookOffset - projectHookOffset) >> 3];        /* code */
  1814. /* no rsvd1Hook label in new format */
  1815.      /* no rsvd1Hook code in new format */
  1816. rsvd2HookOffset:
  1817.      hex string [(classArrayOffset - rsvd2HookOffset) >> 3];         /* code */
  1818.  
  1819.      /* the new tables; note that order is different than the offset order above */
  1820. classArrayOffset:
  1821.      hex string [(typeListOffset - classArrayOffset) >> 3];          /* table */
  1822. typeListOffset:
  1823.      hex string [(upperListOffset - typeListOffset) >> 3];           /* table */
  1824. upperListOffset:
  1825.      hex string [(lowerListOffset - upperListOffset) >> 3];          /* table */
  1826. lowerListOffset:
  1827.      hex string [(upperNoMarkListOffset - lowerListOffset) >> 3];    /* table */
  1828. upperNoMarkListOffset:
  1829.      hex string [(noMarkListOffset - upperNoMarkListOffset) >> 3];   /* table */
  1830. noMarkListOffset:
  1831.      hex string [(wordTableOffset - noMarkListOffset) >> 3];         /* table */
  1832. wordTableOffset:
  1833.      hex string [(wrapTableOffset - wordTableOffset) >> 3];          /* table */
  1834. wrapTableOffset:
  1835.      hex string;
  1836. #else
  1837.      unsigned integer = initHookOffset >> 3;                 /* init hook offset     */
  1838.      unsigned integer = fetchHookOffset >> 3;                /* fetch hook offset    */
  1839.      unsigned integer = vernierHookOffset >> 3;              /* vernier hook offset  */
  1840.      unsigned integer = projectHookOffset >> 3;              /* project hook offset  */
  1841.      unsigned integer = rsvd1HookOffset >> 3;                /* Rsvd1 hook offset    */
  1842.      unsigned integer = rsvd2HookOffset >> 3;                /* Rsvd2 hook offset    */
  1843. initHookOffset:
  1844.      hex string [(fetchHookOffset - initHookOffset) >> 3];   /* init hook code       */
  1845. fetchHookOffset:
  1846.      hex string [(vernierHookOffset - fetchHookOffset) >> 3];/* fetch hook code      */
  1847. vernierHookOffset:
  1848.      hex string [(projectHookOffset - vernierHookOffset) >> 3];/* vernier hook code  */
  1849. projectHookOffset:
  1850.      hex string [(rsvd1HookOffset - projectHookOffset) >> 3];/* project hook code    */
  1851. rsvd1HookOffset:
  1852.      hex string [(rsvd2HookOffset - rsvd1HookOffset) >> 3];  /* rsvd1 hook code      */
  1853. rsvd2HookOffset:
  1854.      hex string;                                             /* rsvd2 hook code      */
  1855. #endif
  1856. };
  1857.  
  1858. æKY itl4
  1859. æC  /*----------------------------itl4 • International Tokenizer----------------------------*/
  1860. type 'itl4' {
  1861.      unsigned hex integer;                                   /* flags                */
  1862.      literal longint = 'itl4';                               /* resource type        */
  1863.      integer;                                                /* resource ID          */
  1864.      integer = $0100;                                        /* version number       */
  1865.      longint = 0;                                            /* reserved             */
  1866.      longint = 0;                                            /* reserved             */
  1867.  
  1868.      integer = 8;                                            /* # of table entries   */
  1869.  
  1870.      unsigned longint = mapCharOffset >> 3;                  /* MapChar offset       */
  1871.      unsigned longint = stringCopyOffset >> 3;               /* stringCopy offset    */
  1872.      unsigned longint = extendFetchOffset >> 3;              /* extendFetch offset   */
  1873.      unsigned longint = unTokenOffset >> 3;                  /* unToken offset       */
  1874.      unsigned longint = defaultPartsTableOffset >> 3;        /* defaultParts offset  */
  1875.      unsigned longint = 0;                                   /* reserved offset      */
  1876.      unsigned longint = 0;                                   /* reserved offset      */
  1877.      unsigned longint = 0;                                   /* reserved offset      */
  1878.      unsigned longint = 0;                                   /* reserved offset      */
  1879.  
  1880.      longint = $$CountOf(MapChar);
  1881. mapCharOffset:
  1882.      array MapChar {
  1883.          byte;
  1884.      };
  1885.  
  1886. extendFetchOffset:
  1887.      hex string [(stringCopyOffset - extendFetchOffset) >> 3];/* extendFetch code    */
  1888. stringCopyOffset:
  1889.      hex string [(unTokenOffset - stringCopyOffset) >> 3];   /* stringCopy code      */
  1890. unTokenOffset:
  1891.      integer = (defaultPartsTableOffset - unTokenOffset) >> 3;/* unToken table size  */
  1892. unTokenSize:
  1893.      integer = $$CountOf(unToken) - 1;
  1894.      array unToken {
  1895.          integer;                                            /* offset to token strings*/
  1896.      };
  1897.      array [$$Word(unTokenSize) + 1] {
  1898.  unTokenItemOffset:
  1899.          pstring;                                            /* token strings        */
  1900.          align word;
  1901.      };
  1902.      
  1903. defaultPartsTableOffset:
  1904.      integer = 1;                                            /* version number       */
  1905.      wide array [31] {
  1906.          unsigned byte;
  1907.          char;
  1908.      };
  1909.      integer;                                                /* size                 */
  1910.      wide array [10] {
  1911.          unsigned byte;
  1912.          char;
  1913.      };
  1914.      integer;                                                /* size                 */
  1915.      wide array [10] {
  1916.          unsigned byte;
  1917.          char;
  1918.      };
  1919.      integer;                                                /* size                 */
  1920.      wide array [10] {
  1921.          unsigned byte;
  1922.          char;
  1923.      };
  1924.      integer;                                                /* size                 */
  1925.      wide array [10] {
  1926.          unsigned byte;
  1927.          char;
  1928.      };
  1929.      hex string [20] = "";
  1930. };
  1931. _______________________________________________________________________________
  1932.  
  1933. »'Itl4' RESOURCE
  1934. _______________________________________________________________________________
  1935.  
  1936. There is a new international resource, 'itl4', which contains information used by
  1937. several of the 2.0 routines and must be localized for each script (including Roman).
  1938.  
  1939. In Pascal:
  1940.  
  1941.   Itl4Rec    = RECORD
  1942.                  flags:           integer;
  1943.                  resourceType:    longInt;
  1944.                  resourceNum:     integer;
  1945.                  version:         integer;
  1946.                  resHeader1:      longInt;
  1947.                  resHeader2:      longInt;
  1948.                  numTables:       integer;    { one-based }
  1949.                  mapOffset:       longInt;    { offsets are from record start }
  1950.                  strOffset:       longInt;
  1951.                  fetchOffset:     longInt;
  1952.                  unTokenOffset:   longInt;
  1953.                  defPartsOffset:  longInt;
  1954.                  resOffset6:      longInt;
  1955.                  resOffset7:      longInt;
  1956.                  resOffset8:      longInt;
  1957.                  { the rest is data pointed to by offsets}
  1958.                END;
  1959.  
  1960.   Itl4Ptr    = ^Itl4Rec;
  1961.   Itl4Handle = ^Itl4Ptr;
  1962.  
  1963. In C:
  1964.  
  1965.   struct Itl4Rec {
  1966.           short    flags;
  1967.           long     resourceType;
  1968.           short    resourceNum;
  1969.           short    version;
  1970.           long     resHeader1;
  1971.           long     resHeader2;
  1972.           short    numTables;            /*one-based*/
  1973.           long     mapOffset;            /*offsets are from record start*/
  1974.           long     strOffset;
  1975.           long     fetchOffset;
  1976.           long     unTokenOffset;
  1977.           long     defPartsOffset;
  1978.           long     resOffset6;
  1979.           long     resOffset7;
  1980.           long     resOffset8;
  1981.   };
  1982.  
  1983.   #ifndef __cplusplus
  1984.   typedef struct Itl4Rec Itl4Rec;
  1985.   #endif
  1986.  
  1987.   typedef Itl4Rec *Itl4Ptr, **Itl4Handle;
  1988.  
  1989. æKY itlb
  1990. æC  /*----------------------------itlb • International Script Bundle------------------------*/
  1991. type 'itlb' {
  1992.      unsigned integer;                                       /* itl0 id number       */
  1993.      unsigned integer;                                       /* itl1 id number       */
  1994.      unsigned integer;                                       /* itl2 id number       */
  1995.      unsigned hex integer;                                   /* script flags - see
  1996.                                                                 smScriptFlags info
  1997.                                                                 in ScriptEqu.a       */
  1998.      unsigned integer;                                       /* itl4 id number       */
  1999.      unsigned integer;                                       /* reserved             */
  2000.      unsigned integer;                                       /* Script language      */
  2001.      unsigned integer;                                       /* high byte - number
  2002.                                                                 representation code,
  2003.                                                                 low byte - date
  2004.                                                                 representation code  */
  2005.      unsigned integer;                                       /* KCHR id number       */
  2006.      unsigned integer;                                       /* SICN id number       */
  2007. };
  2008. æKY itlc
  2009. æC  /*----------------------------itlc • International Configuration------------------------*/
  2010. type 'itlc' {
  2011.      unsigned integer;                                       /* system script code   */
  2012.      unsigned integer;                                       /* keyboard cache size  */
  2013.      byte            noFontForce, fontForce = 255;           /* font force flag      */
  2014.      byte            noIntlForce, intlForce = 255;           /* intl force flag      */
  2015.      byte            noOldKeyboard;                          /* old keyboard         */
  2016.      unsigned hex byte;                                      /* general flags - see
  2017.                                                                 smGenFlags info in
  2018.                                                                 ScriptEqu.a          */
  2019.      integer;                                                /* script icon offset   */
  2020.      byte            rightOffset, leftOffset = 255;          /* menu side for offset */
  2021.      byte;                                                   /* icon data (rsvd)     */
  2022.      hex string [36];                                        /* reserved             */
  2023. };
  2024. æKY itlk
  2025. æC  /*----------------------------itlk • Keyboard-dependent Remapping-----------------------*/
  2026. type 'itlk' {
  2027.      integer = $$CountOf(RemapItemArray);
  2028.      wide array RemapItemArray {
  2029.          integer;                                            /* keyboard type        */
  2030.          hex byte;                                           /* old modifier bits    */
  2031.          byte;                                               /* old key code         */
  2032.          hex byte;                                           /* modifier bits mask   */
  2033.          byte;                                               /* key code mask        */
  2034.          hex byte;                                           /* new modifier bits    */
  2035.          byte;                                               /* new key code         */
  2036.      };
  2037. };
  2038. æKY KCAP
  2039. æC  /*----------------------------KCAP • Physical Layout of Keyboard------------------------*/
  2040. type 'KCAP' {
  2041.      rect;                                                   /* boundsRect           */
  2042.      rect;                                                   /* textRect             */
  2043.      integer = $$CountOf(MainArray);
  2044.      array MainArray {
  2045.          integer = $$CountOf(ShapeArray) - 1;
  2046.          wide array ShapeArray {
  2047.              point;                                          /* shapePoint           */
  2048.          };
  2049.          integer = $$CountOf(KeyArray) - 1;
  2050.          wide array KeyArray {
  2051.              byte;                                           /* mask                 */
  2052.              boolean             or, and;
  2053.              bitstring[7];                                   /* keyCode              */
  2054.              integer;                                        /* dv                   */
  2055.              integer;                                        /* dh                   */
  2056.          };
  2057.      };
  2058. };
  2059. æKY KCHR
  2060. æC  /*----------------------------KCHR • ASCII Mapping (software)---------------------------*/
  2061. type 'KCHR' {
  2062.      integer;                                                /* Version              */
  2063.      wide array [$100] {                                     /* Indexes              */
  2064.          byte;
  2065.      };
  2066.      integer = $$CountOf(TableArray);
  2067.      array TableArray {
  2068.          wide array [$80] {                                  /* ASCII characters     */
  2069.              char;
  2070.          };
  2071.      };
  2072.      integer = $$CountOf(DeadArray);
  2073.      array DeadArray {
  2074.          byte;                                               /* Table number         */
  2075.          byte;                                               /* Virtual keycode      */
  2076.          integer = $$CountOf(CompletorArray);
  2077.          wide array CompletorArray {
  2078.              char;                                           /* Completor char       */
  2079.              char;                                           /* Substituting char    */
  2080.          };
  2081.          char;                                               /* No match char        */
  2082.          char;                                               /* 16-bits for the times
  2083.                                                                 when 8 isn't enough  */
  2084.      };
  2085. };
  2086. æKY KMAP
  2087. æC  /*----------------------------KMAP • Keyboard Mapping (hardware)------------------------*/
  2088. type 'KMAP' {
  2089.      integer;                                                /* ID                   */
  2090.      integer;                                                /* Version              */
  2091.      wide array [$80] {                                      /* Raw to virtual       */
  2092.          byte;                                               /*  keycode map         */
  2093.      };
  2094.      integer = $$CountOf(ExceptionArray);
  2095.      wide array ExceptionArray {
  2096.          byte;                                               /* Raw keycode          */
  2097.          boolean         noXor, Xor;
  2098.          fill bit[3];
  2099.          bitstring[4];                                       /* ADB op               */
  2100.          pstring;
  2101.      };
  2102. };
  2103. æKY KSWP
  2104. æC  /*----------------------------KSWP • Keyboard Swapping----------------------------------*/
  2105. type 'KSWP' {
  2106.      /* The expression below that calculates the number of elements in the
  2107.         array is complicated because of the way that $$ResourceSize works.
  2108.         $$ResourceSize returns the size of the resource.  When derez'ing a
  2109.         resource, the size of the resource is known from the start.  When
  2110.         rez'ing a resource, however, the size starts out at zero and is 
  2111.         incremented each time a field is appended to the resource data.  In
  2112.         other words, while rez'ing, $$ResourceSize rarely returns the final
  2113.         size of the resource.  When rez'ing a KSWP, the array size expression
  2114.         is not evaluated until all of the array elements have been parsed.
  2115.         Since each array element is 4 bytes long (if you add up all the fields),
  2116.         the number of array elements is the size of the resource at that point
  2117.         divided by four.  Since the preprocessor value of "DeRez" is zero when
  2118.         Rez'ing, the expression is equivalent to $$ResourceSize / 4.  When
  2119.         derez'ing a KSWP, the value of $$ResourceSize is constant: always the
  2120.         total size of the resource, in bytes.  Since the resource contains 4
  2121.         bytes of fill at the end (which happens to be the size of an array
  2122.         element), we have to take that in consideration when calculating the
  2123.         size of the array.  Note that the preprocessor value of "DeRez" is one,
  2124.         when derez'ing.
  2125.      */
  2126.      wide array [$$ResourceSize / 4 - DeRez]{
  2127.          hex integer     Roman, Japanese, Chinese, Korean,   /* script code or verb  */
  2128.                          Arabic, Hebrew, Greek,
  2129.                          Rotate = -1, System = -2,
  2130.                          Alternate = -3;
  2131.          unsigned byte;                                      /* virtual key code     */
  2132.          /* Modifiers */
  2133.          fill bit;                                           /* rControlOn,rControlOff*/
  2134.          fill bit;                                           /* rOptionOn,rOptionOff */
  2135.          fill bit;                                           /* rShiftOn,rShiftOff   */
  2136.          boolean     controlOff, controlOn;
  2137.          boolean     optionOff, optionOn;
  2138.          fill bit;                                           /* capsLockOn,capsLockOff*/
  2139.          boolean     shiftOff, shiftOn;
  2140.          boolean     commandOff, commandOn;
  2141.      };
  2142.      fill long;
  2143. };
  2144. æKY mcky
  2145. æC  /*----------------------------mcky • Mouse Tracking-------------------------------------*/
  2146. type 'mcky' {
  2147.      array [8] {
  2148.          unsigned byte;
  2149.      };
  2150. };
  2151. æKY mppc
  2152. æC  /*----------------------------mppc • MPP Configuration Resource-------------------------*/
  2153. type 'mppc' {
  2154.      unsigned hex longint;                                   /* Info passed to drvr  */
  2155.      byte;                                                   /* Override version #   */
  2156.      fill byte;                                              /* Reserved             */
  2157. };
  2158. æKY NFNT
  2159. æC  /*----------------------------NFNT • Font Description-----------------------------------*/
  2160. type 'NFNT' as 'FONT';
  2161.  
  2162. A resource type can be defined that consists of only the character widths and general
  2163. font information—everything but the font’s bit image and location table. If this
  2164. 'FWID' resource type exists, it will be read in whenever QuickDraw doesn’t need to
  2165. draw the text, such as when you call one of the routines CharWidth, HidePen, or
  2166. OpenPicture (which calls HidePen). The FontRec data type described above, minus the
  2167. rowWords, bitImage, and locTable fields, reflects the structure of the 'FWID' resource
  2168. type. The owTLoc field will contain 4, and the fontType field will contain the following
  2169. predefined constant:
  2170.  
  2171. CONST fontWid = $ACB0; {font width data}
  2172.  
  2173. Note:  The extensions to the Font Manager described in the following paragraphs
  2174.        were originally documented in Inside Macintosh, Volume IV.  As such,
  2175.        this information refers to the 128K ROMs and System file version 3.2
  2176.        and later.
  2177.  
  2178. To maintain compatibility with existing applications, the order of the fields in the
  2179. font record remains unchanged; two variable-length arrays are added at the end of the
  2180. record, however, to implement fractional character widths.
  2181.  
  2182.   Number of bytes    Contents
  2183.  
  2184.       m bytes        Optional character-width table of font
  2185.                          m = 2 * (lastChar–firstChar+3)
  2186.       m bytes        Optional image-height table of font
  2187.                          m = 2 * (lastChar–firstChar+3)
  2188.  
  2189. The various sizes of a font are each stored as separate resources. The resource type
  2190. for a font is either 'FONT' or 'NFNT', which is simply the original font record with
  2191. the two additional variable-length arrays added at the end of the record.
  2192.  
  2193. Additional constants have been defined for use in the fontType field; it can now
  2194. contain any of the following values:
  2195.  
  2196. CONST  propFont   = $9000;    {proportional font}
  2197.        prpFntH    = $9001;    { with height table}
  2198.        prpFntW    = $9002;    { with width table}
  2199.        prpFntHW   = $9003;    { with height & width tables}
  2200.  
  2201.        fixedFont  = $B000;    {fixed-width font}
  2202.        fxdFntH    = $B001;    { with height table}
  2203.        fxdFntW    = $B002;    { with width table}
  2204.        fxdFntHW   = $B003;    { with height & width tables}
  2205.  
  2206.        fontWid    = $ACB0;    {font width data:  64K ROM only}
  2207.  
  2208. The low-order two bits of the fontType field tell whether the two optional tables are
  2209. present. If bit 0 is set, there’s an image-height table; if bit 1 is set, there’s a
  2210. character width table.
  2211.  
  2212. The optional character-width table immediately follows the offset/width table; it’s a
  2213. variable-length array specifying the fixed-point character widths for each character
  2214. in the font. Each entry is a word in length. For compactness, a special 16-bit fixed-point
  2215. format is used with an unsigned integer part in the high-order byte and a fractional
  2216. part in the low-order byte.
  2217.  
  2218. •••Refer to Technical Note #30:•••
  2219.  
  2220. The optional image-height table, which speeds the drawing of characters, may also be
  2221. appended after the character-width table; it’s a variable-length array specifying the
  2222. image height of each character in the font. Each entry is a word in length; the
  2223. high-order byte is the offset of the first non-white row in the character; the low-order
  2224. byte is the number of rows that must be drawn. The image height is the height of the
  2225. character image and is less than or equal to the font height; it’s used in conjunction
  2226. with QuickDraw for improved character plotting. Most font resources don’t contain
  2227. this table; it’s typically generated by the Font Manager when the font is swapped
  2228. in.
  2229.  
  2230. Note:  The 64K ROM version of the Resource Manager limits the total space
  2231.        occupied by the bit image, location table, offset/width table, and
  2232.        character-width and image-height tables to 32K bytes. For this reason,
  2233.        the practical limit on the font size of a full font is about 40 points.
  2234.  
  2235. Note:  The extensions to the Font Manager described in the following paragraphs
  2236.        were originally documented in Inside Macintosh, Volume V.  As such,
  2237.        this information refers to the Macintosh SE and Macintosh II ROMs and
  2238.        System file version 4.1 and later.
  2239.  
  2240. Several previously unused bits of the fontType field specify the font depth and other
  2241. related information (the new bits are marked by an asterisk):
  2242.  
  2243.   Bit    Meaning
  2244.  
  2245.   0      Set if there’s an image-height table
  2246.   1      Set if there’s a character-width table
  2247. * 2–3    Font depth (Macintosh II only—must be 0 otherwise)
  2248.   4–6    Reserved (should be 0)
  2249. * 7      Set if font has an 'fctb' resource (Macintosh II
  2250.          only—must be 0 otherwise)
  2251. * 8      Set if a synthetic font (Macintosh II only—must be 0 otherwise)
  2252. * 9      Set if font contains colors other than black (Macintosh II
  2253.          only—must be 0 otherwise)
  2254.   10–11  Reserved (should be 0)
  2255.   12     Reserved (should be 1)
  2256.   13     Set for fixed-width font, clear for proportional font
  2257. * 14     Set if font is not to be expanded (Macintosh II
  2258.          only—must be 0 otherwise)
  2259.   15     Reserved (should be 1)
  2260.  
  2261. Bit 2 and 3 specify the font depth and can contain the following values:
  2262.  
  2263.   Value    Font depth
  2264.     0      1-bit
  2265.     1      2-bit
  2266.     2      4-bit
  2267.     3      8-bit
  2268.  
  2269. The font depth is normally 0, indicating a font intended for a screen one bit deep. 
  2270. If bit 7 is set (and the font is an 'NFNT' resource), a resource of type 'fctb' with
  2271. the same ID as the font can optionally be provided to assign RGB colors to specific
  2272. pixel values.
  2273.  
  2274. Bit 8 is used only by the Font Manager to indicate a synthetic font, created dynamically
  2275. from the available font resources in response to a certain color and screen depth
  2276. combination.
  2277.  
  2278. Bit 9 is set if the font contains other than black.
  2279.  
  2280. Setting bit 14 indicates that the font should not be expanded by the Font Manager to
  2281. match the screen depth; some international fonts, such as kanji, are too large for
  2282. synthetic fonts to be effective or meaningful.
  2283.  
  2284. To accommodate multibit font depths, the owTLoc field has been changed to a long
  2285. word, the nDescent field becoming the high-order word.  (For backward compatibility,
  2286. nDescent is ignored if it’s negative.)
  2287.  
  2288. Note:  The 128K ROM version of the Font Manager limits the strike for a
  2289.        1-bit font to not quite 128K; this limits the largest practical
  2290.        font to about 127 points.  The Macintosh II ROM limits the largest
  2291.        practical font to about 255 points, regardless of the font depth.
  2292.  
  2293. »Font Color Tables
  2294.  
  2295. Note:  The extensions to the Font Manager described in the following paragraphs
  2296.        were originally documented in Inside Macintosh, Volume V.  As such,
  2297.        this information refers to the Macintosh SE and Macintosh II ROMs and
  2298.        System file version 4.1 and later.
  2299.  
  2300. With resources of type 'NFNT', you can specify absolute colors for the font by also
  2301. supplying a color table.  Stored as a resource of type 'fctb' with the same ID as the
  2302. associated 'NFNT' resource, this table is simply the ColorTable record described in
  2303. the Color Manager chapter.
  2304.  
  2305. A 4-bit font depth provides index values for a color table containing 16 entries.  If
  2306. there are index values for which no corresponding entries are found in the associated
  2307. color table, the Font Manager assigns colors based on the current port’s foreground
  2308. and background colors.  If only one entry is missing, it’s assigned the background
  2309. color.  If two entries are missing, the higher index value is assigned the foreground
  2310. color and the lower value is given the background color.  If more than two values are
  2311. missing, the entries are given shades ranging between the foreground and background
  2312. colors.  Figure 19 shows a hypothetical color table for a 2-bit font in which only
  2313. five entries have been supplied in the 'fctb' resource.
  2314.  
  2315. •••Refer to Figure 19.•••
  2316.  
  2317. Figure 19–Hypothetical Font Color Table Entries
  2318.  
  2319. If no color table is provided, the highest and lowest possible index values for any
  2320. given screen depth (with a 2-bit screen depth, for example, values 7 and 0) are
  2321. assigned the foreground and background colors respectively, with the remaining entries
  2322. given shades in between.  This allows gray-scale fonts to be created with as many
  2323. levels of gray as are needed (since each gray is just a color in between a foreground
  2324. of black and a background of white) without needing a color table.
  2325.  
  2326. æKY nrct
  2327. æC  /*----------------------------nrct • Rectangle List-------------------------------------*/
  2328. type 'nrct' {
  2329.      integer = $$CountOf(RectArray);                         /* Number of rectangles */
  2330.      array RectArray {
  2331.          rect;
  2332.      };
  2333. };
  2334.  
  2335. æKY ROv#
  2336. æC  /*----------------------------ROv# • ROM Resource Override------------------------------*/
  2337. type 'ROv#' {
  2338.      unsigned hex integer;                                   /* Version # of ROM     */
  2339.      integer = $$CountOf(typeList) - 1;                      /* Number of resources  */
  2340.      wide array typeList {
  2341.          literal longint;                                    /* Resource type        */
  2342.          integer;                                            /* Resource id          */
  2343.      };
  2344. };
  2345.  
  2346. æKY scrn
  2347. æC  /*----------------------------scrn • Screen Configuration-------------------------------*/
  2348. type 'scrn' {
  2349.      integer = $$CountOf(Device);                            /* Number of displays   */
  2350.      wide array Device {
  2351.          unsigned hex integer;                               /* sRsrc Type           */
  2352.          integer;                                            /* Slot number          */
  2353.          unsigned hex longint;                               /* dCtlDevBase          */
  2354.          integer;                                            /* sRsrcID for mode     */
  2355.          integer = $77FE;                                    /* Flag mask            */
  2356.          Boolean         inactive, active;                   /* Device active flag   */
  2357.          fill bit[3];                                        /* reserved             */
  2358.          Boolean         auxillaryScreen, mainScreen;        /* Main screen flag     */
  2359.          unsigned bitstring[10] = 0;                         /* reserved             */
  2360.          Boolean         monochrome, color;                  /* Device type          */
  2361.          integer;                                            /* Rsrc ID of 'clut'    */
  2362.          integer;                                            /* Rsrc ID of 'gama'    */
  2363.          Rect;                                               /* Device's global rect */
  2364.          integer = $$CountOf(ControlCalls);                  /* # of control calls   */
  2365.          wide array ControlCalls {
  2366.              integer;                                        /* csCode for this call */
  2367.              wstring;                                        /* param block data     */
  2368.              align word;
  2369.              
  2370.          };
  2371.      };
  2372. };
  2373. _______________________________________________________________________________
  2374.  
  2375. »GRAPHICS DEVICE RESOURCES
  2376. _______________________________________________________________________________
  2377.  
  2378. A new resource type has been added to describe the setup of graphics devices:
  2379.  
  2380.     'scrn'    Screen resource type
  2381.  
  2382. The 'scrn' resource contains all the screen configuration information for a multiple
  2383. screen system.  Only the 'scrn' resource with ID = 0 is used by the system.  Normally
  2384. your application won’t have to alter or examine this resource.  It’s created by the
  2385. control panel, and is used by InitGraf.
  2386.  
  2387. The 'scrn' resource consists of a sequence of records, each describing one screen
  2388. device.  In the following description this sequence of records is represented by a
  2389. Pascal FOR loop that repeats once for each screen device.
  2390.  
  2391. 'scrn'     (Screen configuration)
  2392.  
  2393.     ScrnCount         [word]    number of devices in resource
  2394.     FOR i := 1 to ScrnCount DO
  2395.       spDrvrHw        [word]    Slot Manager hardware ID
  2396.       slot            [word]    slot number
  2397.       dCtlDevBase     [long]    dCtlDevBase from DCE
  2398.       mode            [word]    Slot Manager ID for screen’s mode
  2399.       flagMask        [word]    = $77FE
  2400.       flags           [word]    indicates device state
  2401.                                   bit 0  = 0 if monochrome; 1 if color
  2402.                                   bit 11 = 1 if device is main screen
  2403.                                   bit 15 = 1 if device is active
  2404.       colorTable      [word]    resource id of desired 'clut'
  2405.       gammaTable      [word]    resource id of desired 'gama'
  2406.       global Rect     [rect]    device’s global rectangle
  2407.       ctlCount        [word]    number of control calls
  2408.       FOR j := 1 to ctlCount DO
  2409.         csCode        [word]    control code for this call
  2410.         length        [word]    number of bytes in param block
  2411.         param blk     [length]  data to be passed in control call
  2412.       END;
  2413.     END;
  2414.  
  2415. The records in the 'scrn' resource must be in the same order as cards in the slots
  2416. (starting with the lowest slot).  InitGraf scans through the video cards in the
  2417. slots, and compares them with the descriptors in the 'scrn' resource.  If the spDrvrHw,
  2418. slot, and dCtlDevBase fields all match for every screen device in the system, the
  2419. 'scrn' resource is used to initialize the video devices.  Otherwise the 'scrn' resource
  2420. is simply ignored.  Thus if you move a video card, or add or remove one, the 'scrn'
  2421. resource will become invalid.
  2422.  
  2423. SpDrvrHw is a Slot Manager field that identifies the type of hardware on the card.
  2424. (The spDrvrSw field on the card must identify it as an Apple-compatible video driver.)
  2425. Slot is the number of the slot containing the card.  DCtlDevBase is the beginning of
  2426. the device’s address space, taken from the device’s DCE.
  2427.  
  2428. If all video devices match, the rest of the information in the 'scrn' resource is
  2429. used to configure the video devices.  The  mode is actually the slot manager ID
  2430. designating the descriptor for that mode.  This same mode number is passed to the
  2431. video driver to tell it which mode to use.
  2432.  
  2433. The flags bits are used to determine whether the device is active (that is, whether
  2434. it will be used), whether it’s color or monochrome, and whether it’s the main screen
  2435. (the one with the menu bar).  The flagMask simply tells which bits in the flags word
  2436. are used.
  2437.  
  2438. To use the default color table for a device, set the colorTable field to –1. To use
  2439. the default gamma table for a device, set the gammaTable field to –1.
  2440. (Gamma correction is a technique used to select the appropriate intensities of the
  2441. colors sent to a display device. The default gamma table is designed for the Macintosh
  2442. II 13-inch color monitor; other manufacturers’ color monitors might incorporate their
  2443. own gamma tables.)
  2444.  
  2445. The global rect specifies the coordinates of the device relative to other devices. 
  2446. The main device must have topLeft = 0,0. The coordinates of all other devices are
  2447. specified relative to this device.  Devices may not overlap, and must share at least
  2448. part of an edge with another device.  To support future device capabilities, a series
  2449. of control calls may be specified.  These are issued to the driver in the given
  2450. order.
  2451.  
  2452. æKY snd 
  2453. æC  /*----------------------------snd  • Sound----------------------------------------------*/
  2454. type 'snd ' {
  2455.      switch {
  2456.          case FormatOne:
  2457.              key unsigned integer = $0001;
  2458.              unsigned integer = $$CountOf(Synthesizers);
  2459.              wide array Synthesizers {
  2460.                  /* Resource ID of synthesizer/modifer */
  2461.                  integer     generalNoteSynth        = $0001,    // For any Macintosh
  2462.                              generalWaveTableSynth   = $0003,
  2463.                              generalSampledSynth     = $0005,
  2464.                              
  2465.                              sndChipNoteSynth        = $0801,    // For Macintosh with
  2466.                              sndChipWaveTableSynth   = $0803,    // Apple sound chip
  2467.                              sndChipSampledSynth     = $0805,
  2468.                              
  2469.                              plusAndSEnoteSynth      = $1001,    // For Macintosh Plus
  2470.                              plusAndSEwaveTableSynth = $1003,    // and SE
  2471.                              plusAndSEsampledSynth   = $1005;
  2472.                  longint;                                    /* init parameter       */
  2473.              };
  2474.  
  2475.          case FormatTwo:
  2476.              key unsigned integer = $0002;
  2477.              integer     free = 0, keepInMemory = 256+1;     /* Space for refe count */
  2478.      };
  2479.      unsigned integer = $$CountOf(SoundCmnds);
  2480.      wide array SoundCmnds {
  2481.          boolean     noData, hasData;
  2482.          switch {
  2483.              case nullCmd:
  2484.                  key bitstring[15] = 0;
  2485.                  fill word;                                  /* Param 1 = nil        */
  2486.                  fill long;                                  /* Param 2 = nil        */
  2487.              case initCmd:
  2488.                  key bitstring[15] = 1;
  2489.                  fill word;                                  /* Param 1 = nil        */
  2490.                  longint     initChanLeft = $02,             /* Init                 */
  2491.                              initChanRight = $03,
  2492.                              initChan0 = $04, initChan1 = $05,
  2493.                              initChan2 = $06, initChan3 = $07,
  2494.                              initSRate22k = $20, initSRate44k = $30,
  2495.                              initMono = $80, initStereo = $C0;
  2496.              case freeCmd:
  2497.                  key bitstring[15] = 2;
  2498.                  fill word;                                  /* Param 1 = nil        */
  2499.                  fill long;                                  /* Param 2 = nil        */
  2500.              case quietCmd:
  2501.                  key bitstring[15] = 3;
  2502.                  fill word;                                  /* Param 1 = nil        */
  2503.                  fill long;                                  /* Param 2 = nil        */
  2504.              case flushCmd:
  2505.                  key bitstring[15] = 4;
  2506.                  fill word;                                  /* Param 1 = nil        */
  2507.                  fill long;                                  /* Param 2 = nil        */
  2508.              case waitCmd:
  2509.                  key bitstring[15] = 10;
  2510.                  integer     oneSecond = 2000;               /* Duration             */
  2511.                  fill long;                                  /* Param 2 = nil        */
  2512.              case pauseCmd:
  2513.                  key bitstring[15] = 11;
  2514.                  fill word;                                  /* Param 1 = nil        */
  2515.                  fill long;                                  /* Param 2 = nil        */
  2516.              case resumeCmd:
  2517.                  key bitstring[15] = 12;
  2518.                  fill word;                                  /* Param 1 = nil        */
  2519.                  fill long;                                  /* Param 2 = nil        */
  2520.              case callBackCmd:
  2521.                  key bitstring[15] = 13;
  2522.                  integer;                                    /* User-defined         */
  2523.                  longint;                                    /* User-defined         */
  2524.              case syncCmd:
  2525.                  key bitstring[15] = 14;
  2526.                  integer;                                    /* Count                */
  2527.                  longint;                                    /* Identifier           */
  2528.              case emptyCmd:
  2529.                  key bitstring[15] = 15;
  2530.                  fill word;                                  /* Param 1 = nil        */
  2531.                  fill long;                                  /* Param 2 = nil        */
  2532.              case tickleCmd:
  2533.                  key bitstring[15] = 20;
  2534.                  fill word;                                  /* Param 1 = nil        */
  2535.                  fill long;                                  /* Param 2 = nil        */
  2536.              case requestNextCmd:
  2537.                  key bitstring[15] = 21;
  2538.                  integer;                                    /* Count                */
  2539.                  fill long;                                  /* Param 2 = nil        */
  2540.              case howOftenCmd:
  2541.                  key bitstring[15] = 22;
  2542.                  integer;                                    /* Period               */
  2543.                  longint;                                    /* Ptr to modifier stub */
  2544.              case wakeUpCmd:
  2545.                  key bitstring[15] = 23;
  2546.                  integer;                                    /* Period */
  2547.                  longint;                                    /* Ptr to modifier stub */
  2548.              case availableCmd:
  2549.                  key bitstring[15] = 24;
  2550.                  integer;                                    /* Status               */
  2551.                  longint     initChanLeft = $02,             /* Init                 */
  2552.                              initChanRight = $03,
  2553.                              initChan0 = $04, initChan1 = $05,
  2554.                              initChan2 = $06, initChan3 = $07,
  2555.                              initSRate22k = $20, initSRate44k = $30,
  2556.                              initMono = $80, initStereo = $C0;
  2557.              case versionCmd:
  2558.                  key bitstring[15] = 25;
  2559.                  fill word;                                  /* Param 1 = nil        */
  2560.                  longint;                                    /* Version returned     */
  2561.              case noteCmd:
  2562.                  key bitstring[15] = 40;
  2563.                  integer     oneSecond = 2000;               /* Duration             */
  2564.                  longint;                                    /* Amplitude + frequency*/
  2565.              case restCmd:
  2566.                  key bitstring[15] = 41;
  2567.                  integer     oneSecond = 2000;               /* Duration             */
  2568.                  fill long;                                  /* Param 2 = nil        */
  2569.              case freqCmd:
  2570.                  key bitstring[15] = 42;
  2571.                  fill word;                                  /* Param 1 = nil        */
  2572.                  longint;                                    /* Frequency            */
  2573.              case ampCmd:
  2574.                  key bitstring[15] = 43;
  2575.                  integer;                                    /* Amplitude            */
  2576.                  fill long;                                  /* Param 2              */
  2577.              case timbreCmd:
  2578.                  key bitstring[15] = 44;
  2579.                  integer     sineWave, squareWave = 255;     /* Timbre               */
  2580.                  fill long;                                  /* Param 2              */
  2581.              case waveTableCmd:
  2582.                  key bitstring[15] = 60;
  2583.                  unsigned integer;                           /* Length               */
  2584.                  longint;                                    /* Pointer to table     */
  2585.              case phaseCmd:
  2586.                  key bitstring[15] = 61;
  2587.                  integer;                                    /* Shift                */
  2588.                  longint;                                    /* chanPtr              */
  2589.              case soundCmd:
  2590.                  key bitstring[15] = 80;
  2591.                  fill word;                                  /* Param 1 = nil        */
  2592.                  longint;                                    /* Pointer to sound     */
  2593.              case bufferCmd:
  2594.                  key bitstring[15] = 81;
  2595.                  fill word;                                  /* Param 1 = nil        */
  2596.                  longint;                                    /* Pointer to buffer    */
  2597.              case rateCmd:
  2598.                  key bitstring[15] = 82;
  2599.                  fill word;                                  /* Param 1 = nil        */
  2600.                  longint;                                    /* Rate                 */
  2601.              case contBufferCmd:
  2602.                  key bitstring[15] = 83;
  2603.                  fill word;                                  /* Param 1 = nil        */
  2604.                  longint;                                    /* Pointer              */
  2605.          };
  2606.      };
  2607.      array DataTables {
  2608.  DataTable:
  2609.          fill long;                                          /* Pointer to data      */
  2610.  SampleCnt:
  2611.          unsigned longint;                                   /* # of sound samples   */
  2612.          unsigned hex longint
  2613.                  Rate22K = $56ee8ba4;                        /* Sampling rate        */
  2614.          unsigned longint;                                   /* Start of loop        */
  2615.          unsigned longint;                                   /* End of loop          */
  2616.          integer;                                            /* baseNote             */
  2617.          hex string [$$Long(SampleCnt[$$ArrayIndex(DataTables)])];
  2618.      };
  2619. };
  2620. _______________________________________________________________________________
  2621.  
  2622. »SOUND RESOURCES
  2623. _______________________________________________________________________________
  2624.  
  2625. •••Refer to Figure 3.•••
  2626.  
  2627. Figure 3–'snd ' Resource Layout
  2628.  
  2629. Sound resources are intended to be simple, portable, and dynamic solutions for incorporating
  2630. sounds into applications.  Creating these 'snd ' or sound resources, requires some
  2631. understanding of sound synthesis to build a sampled sound header, wave table data,
  2632. and sound commands.  There are two types of
  2633. 'snd ' resources, format 1 and format 2.  Figure 3 compares the structures of both of
  2634. these formats.  These resources should have their purgeable bit set or the application
  2635. will need to call _HPurge after using the 'snd '.
  2636.  
  2637. The format 1 'snd ' was developed for use with the Sound Manager.  A format 1
  2638. 'snd ' may be a sequence of commands describing a melody without specifying a synthesizer
  2639. or modifier and without sound data.  This would allow an application to use the
  2640. _SndPlay routine on any channel to play that melody.  A format 1 'snd ' resource may
  2641. contain a sampled sound or wave table data.
  2642.  
  2643. The format 2 'snd ' was developed for use with HyperCard.  It is intended for use
  2644. with the sampled sound synthesizer only.  A format 2 simply contains a sound command
  2645. that points to a sampled sound header.
  2646.  
  2647. Warning:  HyperCard (versions 1.2.1 and earlier) contain 'snd ' resources
  2648.           incorrectly labeled as format 1.  Refer to Macintosh Technical
  2649.           Note #168.
  2650.  
  2651. Note:  Numbers for 'snd ' resources in the range 0 through 8191 are reserved
  2652.        for Apple.  The 'snd ' resources numbered 1 through 4 are defined to be
  2653.        the standard system beep.
  2654.  
  2655. A sound command contained in a 'snd ' resource with associated sound data is marked
  2656. by setting the high bit of the command.  This changes the param2 field of the command
  2657. to be an offset value from the resource’s beginning, pointing to the location of the
  2658. sound data.  Refer to Figure 5 showing the structure of a sound command.  To calculate
  2659. this offset, use one of the following formulas below.
  2660.  
  2661. For a format 1 'snd ' resource, the offset is calculated as follows:
  2662.  
  2663.   offset = 4 + (number of synth/mods * 6) + (number of cmds * 8)
  2664.  
  2665. For a format 2 'snd ' resource, the offset is calculated as follows:
  2666.  
  2667.   offset = 6 + (number of cmds * 8)
  2668.  
  2669. The first few bytes of the resource contain 'snd ' header information and are a
  2670. different size for either format.  Each synthesizer or modifier specified in a format
  2671. 1 'snd ' requires 6 bytes.  The number of synthesizers and/or modifiers multiplied by
  2672. 6 is added to this offset.  The number of commands multiplied by 8 bytes, the size of
  2673. a sound command, is added to the offset.
  2674.  
  2675. _______________________________________________________________________________
  2676.  
  2677. »Format 1 'snd ' Resource
  2678.  
  2679. Figure 3 shows the fields of a format 1 'snd '  resource.  This resource may also
  2680. contain the actual sound data for the wave table synthesizer or the sampled sound
  2681. synthesizer.  The number of synthesizer and modifiers to be used by this 'snd ' is
  2682. specified in the field number of synth/modifiers.  The synthesizer required to produce
  2683. the sound described in the 'snd ' is specified by the field synth resource ID.  If
  2684. any modifiers are to be installed, their resource IDs follow the first synthesizer. 
  2685. Any synthesizer or modifier specified beyond this first one will be installed into
  2686. the channel as a modifier.
  2687.  
  2688. For every synthesizer and modifier, an init option can be supplied in the field
  2689. immediately following the resource ID for each synthesizer or modifier.  The number
  2690. of commands within the resource is specified in the field number of sound commands. 
  2691. Each sound command follows in the order they should be sent to the channel.  If a
  2692. command such as a bufferCmd is contained in this resource, it needs to specify where
  2693. in the resource the sampled sound header is located.  This is done by setting the
  2694. high bit of the bufferCmd and supplying the offset in param2.  Refer to the section
  2695. “Sound Manager Commands”.
  2696.  
  2697. The 'snd ' resource may be only a sequence of commands describing a melody playable
  2698. by any synthesizer.  This allows the 'snd ' to be used on any channel.  In this case
  2699. the number of synth/modifiers should be 0, and there would not be a synth resource ID
  2700. nor init option in the 'snd '.
  2701.  
  2702. »Example Format 1 'snd '
  2703.  
  2704. The following example resource contains the proper information to create a sound with
  2705. _SndPlay and the sampled sound synthesizer.
  2706.  
  2707.   HEX          Size    Meaning
  2708.  
  2709.   {beginning of snd resource, header information}
  2710.   $0001        WORD    format 1 resource
  2711.   $0001        WORD    number of synth/modifiers to be installed
  2712.  
  2713.   {synth ID to be used}
  2714.   $0005        WORD    resource ID of the first synth/modifier
  2715.   $0000 0000   LONG    initialization option for first synth/modifier
  2716.  
  2717.   $0001        WORD    number of sound commands to follow
  2718.  
  2719.   {first command, 8 bytes in length}
  2720.   $8051        WORD    bufferCmd, high bit on to indicate sound data included
  2721.   $0000        WORD    bufferCmd param1
  2722.   $0000 0014   LONG    bufferCmd param2, offset to sound header (20 bytes)
  2723.  
  2724.   {sampled sound header used in a soundCmd and bufferCmd}
  2725.   $0000 0000   LONG    pointer to data (it follows immediately}
  2726.   $0000 0BB8   LONG    number of samples in bytes (3000 samples)
  2727.   $56EE 8BA3   LONG    sampling rate of this sound (22kHz)
  2728.   $0000 07D0   LONG    starting of the sample’s loop point
  2729.   $0000 0898   LONG    ending of the sample’s loop point
  2730.   $00          BYTE    standard sample encoding
  2731.   $3C          BYTE    baseNote (middle C) at which sample was taken
  2732.  
  2733.   {Packed Array [1..3000] OF Byte, the sampled sound data}
  2734.   $8080 8182 8487 9384 6F68 6D65 727B 8288
  2735.   $918E 8D8F 867E 7C79 6F6D 7170 7079 7F81
  2736.   $898F 8D8B...
  2737.  
  2738. _______________________________________________________________________________
  2739.  
  2740. »Format 2 'snd ' Resource
  2741.  
  2742. The format 2 'snd ' resource is used by the sampled sound synthesizer only and must
  2743. contain a sampled sound.  The _SndPlay routine supports this format by automatically
  2744. opening a channel to the sample sound synthesizer and using the bufferCmd.
  2745.  
  2746. Figure 3 shows the fields of a format 2 'snd '  resource.  The field reference count
  2747. is for the application’s use and is not used by the Sound Manager.  The fields number
  2748. of sound commands and the sound commands are the same as described in a format 1
  2749. resource.  The last field of this 'snd ' is for the sampled sound.  The first command
  2750. should be either a soundCmd or bufferCmd with the pointer bit set in the command to
  2751. specify the location of this sampled sound header.  Any other sound commands in this
  2752. 'snd ' will be ignored by the Sound Manager.
  2753.  
  2754. »Example Format 2 'snd '
  2755.  
  2756. The following example resource contains the proper information to create a sound with
  2757. _SndPlay and the sampled sound synthesizer.
  2758.  
  2759.   HEX          Size    Meaning
  2760.  
  2761.   {beginning of 'snd ' resource, header information}
  2762.   $0002        WORD    format 2 resource
  2763.   $0000        WORD    reference count for application’s use
  2764.   $0001        WORD    number of sound commands to follow
  2765.  
  2766.   {first command, 8 bytes in length}
  2767.   $8051        WORD    bufferCmd, high bit on to indicate sound data included
  2768.   $0000        WORD    bufferCmd param1
  2769.   $0000 0014   LONG    bufferCmd param2, offset to sound header (20 bytes)
  2770.  
  2771.   {sampled sound header used in a soundCmd and bufferCmd}
  2772.   $0000 0000   LONG    pointer to data (it follows immediately}
  2773.   $0000 0BB8   LONG    number of samples in bytes (3000 samples)
  2774.   $56EE 8BA3   LONG    sampling rate of this sound (22kHz)
  2775.   $0000 07D0   LONG    starting of the sample’s loop point
  2776.   $0000 0898   LONG    ending of the sample’s loop point
  2777.   $00          BYTE    standard sample encoding
  2778.   $3C          BYTE    baseNote (middle C) at which sample was taken
  2779.  
  2780.   {Packed Array [1..3000] OF Byte, the sampled sound data}
  2781.   $8080 8182 8487 9384 6F68 6D65 727B 8288
  2782.   $918E 8D8F 867E 7C79 6F6D 7170 7079 7F81
  2783.   $898F 8D8B...
  2784.  
  2785. æKY vers
  2786. æC  /*----------------------------vers • Version--------------------------------------------*/
  2787. type 'vers' {
  2788.      hex byte;                                               /* Major revision in BCD*/
  2789.      hex byte;                                               /* Minor vevision in BCD*/
  2790.      hex byte    development = 0x20,                         /* Release stage        */
  2791.                  alpha = 0x40,
  2792.                  beta = 0x60,
  2793.                  final = 0x80, /* or */ release = 0x80;
  2794.      hex byte;                                               /* Non-final release #  */
  2795.      integer     Country;                                    /* Country code         */
  2796.      pstring;                                                /* Short version number */
  2797.      pstring;                                                /* Long version number  */
  2798. };
  2799. æKY PICT
  2800. æC  /*----------------------------PICT • Quickdraw Picture----------------------------------*/
  2801. type 'PICT' {
  2802.      unsigned integer;                                       /* Length               */
  2803.      rect;                                                   /* Frame                */
  2804.      hex string;                                             /* Data                 */
  2805. };
  2806. /*--------------------------------------------------------------------------------------*/
  2807. type 'PICT' {
  2808.  startOfPict:
  2809.      unsigned integer = (endOfPict - startOfPict) >> 3;
  2810.      Rect;                                   /* Bounds of picture */
  2811.      switch {
  2812.          case VersionOne:
  2813.              key integer = $1101;
  2814.              array OpCodes {
  2815.                  switch {
  2816.                      case NOP:
  2817.                          key byte = $00;
  2818.  
  2819.                      case clipRgn:
  2820.                          key byte = $01;
  2821.  clipRgnStart:           integer = (clipRgnEnd[$$ArrayIndex(OpCodes)] - clipRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  2822.                          Rect;               /* region's enclosing rect */
  2823.                          hex string [$$Word(clipRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  2824.  clipRgnEnd:
  2825.                      case bkPat:
  2826.                          key byte = $02;
  2827.                          hex string [8];
  2828.                      
  2829.                      case txFont:
  2830.                          key byte = $03;
  2831.                          integer;            /* font */
  2832.                      
  2833.                      case txFace:
  2834.                          key byte = $04;
  2835.                          unsigned hex byte;  /* text face */
  2836.                      
  2837.                      case txMode:
  2838.                          key byte = $05;
  2839.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  2840.                                      notSrcCopy, notSrcOr, notSrcXor,
  2841.                                      notSrcBic, patCopy, patOr, patXor,
  2842.                                      patBic, notPatCopy, notPatOr, notPatBic;
  2843.                      
  2844.                      case spExtra:
  2845.                          key byte = $06;
  2846.                          unsigned hex longint;
  2847.                      
  2848.                      case pnSize:
  2849.                          key byte = $07;
  2850.                          Point;
  2851.                      
  2852.                      case pnMode:
  2853.                          key byte = $08;
  2854.                          unsigned hex integer;
  2855.                      
  2856.                      case pnPat:
  2857.                          key byte = $09;
  2858.                          hex string [8];
  2859.                      
  2860.                      case thePat:
  2861.                          key byte = $0A;
  2862.                          hex string [8];
  2863.                      
  2864.                      case ovSize:
  2865.                          key byte = $0B;
  2866.                          Point;
  2867.                      
  2868.                      case origin:
  2869.                          key byte = $0C;
  2870.                          integer;            /* dh */
  2871.                          integer;            /* dv */
  2872.                      
  2873.                      case txSize:
  2874.                          key byte = $0D;
  2875.                          integer;
  2876.                      
  2877.                      case fgColor:
  2878.                          key byte = $0E;
  2879.                          longint;
  2880.                      
  2881.                      case bkColor:
  2882.                          key byte = $0F;
  2883.                          longint;
  2884.                      
  2885.                      case txRatio:
  2886.                          key byte = $10;
  2887.                          Point;              /* numer */
  2888.                          Point;              /* denom */
  2889.                      
  2890.                      case picVersion:
  2891.                          key byte = $11;
  2892.                          byte;
  2893.                      
  2894.                      case line:
  2895.                          key byte = $20;
  2896.                          Point;              /* pnLoc */
  2897.                          Point;              /* newPt */
  2898.                      
  2899.                      case lineFrom:
  2900.                          key byte = $21;
  2901.                          Point;              /* newPt */
  2902.                      
  2903.                      case shortLine:
  2904.                          key byte = $22;
  2905.                          Point;              /* pnLoc */
  2906.                          byte;               /* dh */
  2907.                          byte;               /* dv */
  2908.                      
  2909.                      case shortLineFrom:
  2910.                          key byte = $23;
  2911.                          byte;               /* dh */
  2912.                          byte;               /* dv */
  2913.                      
  2914.                      case longText:
  2915.                          key byte = $28;
  2916.                          Point;              /* txLoc */
  2917.                          pstring;
  2918.                      
  2919.                      case dhText:
  2920.                          key byte = $29;
  2921.                          byte;               /* dh */
  2922.                          pstring;
  2923.                          
  2924.                      case dvText:
  2925.                          key byte = $2A;
  2926.                          byte;               /* dvh */
  2927.                          pstring;
  2928.                          
  2929.                      case dhdvText:
  2930.                          key byte = $2B;
  2931.                          byte;               /* dh */
  2932.                          byte;               /* dv */
  2933.                          pstring;
  2934.                          
  2935.                      case frameRect:
  2936.                          key byte = $30;
  2937.                          Rect;
  2938.                          
  2939.                      case paintRect:
  2940.                          key byte = $31;
  2941.                          Rect;
  2942.                          
  2943.                      case eraseRect:
  2944.                          key byte = $32;
  2945.                          Rect;
  2946.                          
  2947.                      case invertRect:
  2948.                          key byte = $33;
  2949.                          Rect;
  2950.                          
  2951.                      case fillRect:
  2952.                          key byte = $34;
  2953.                          Rect;
  2954.                      
  2955.                      case frameSameRect:
  2956.                          key byte = $38;
  2957.                          
  2958.                      case paintSameRect:
  2959.                          key byte = $39;
  2960.                          
  2961.                      case eraseSameRect:
  2962.                          key byte = $3A;
  2963.                          
  2964.                      case invertSameRect:
  2965.                          key byte = $3B;
  2966.                          
  2967.                      case fillSameRect:
  2968.                          key byte = $3C;
  2969.                      
  2970.                      case frameRRect:
  2971.                          key byte = $40;
  2972.                          Rect;
  2973.                          
  2974.                      case paintRRect:
  2975.                          key byte = $41;
  2976.                          Rect;
  2977.                          
  2978.                      case eraseRRect:
  2979.                          key byte = $42;
  2980.                          Rect;
  2981.                          
  2982.                      case invertRRect:
  2983.                          key byte = $43;
  2984.                          Rect;
  2985.                          
  2986.                      case fillRRect:
  2987.                          key byte = $44;
  2988.                          Rect;
  2989.                          
  2990.                      case frameSameRRect:
  2991.                          key byte = $48;
  2992.                          
  2993.                      case paintSameRRect:
  2994.                          key byte = $49;
  2995.                          
  2996.                      case eraseSameRRect:
  2997.                          key byte = $4A;
  2998.                          
  2999.                      case invertSameRRect:
  3000.                          key byte = $4B;
  3001.                          
  3002.                      case fillSameRRect:
  3003.                          key byte = $4C;
  3004.                          
  3005.                      case frameOval:
  3006.                          key byte = $50;
  3007.                          Rect;
  3008.                          
  3009.                      case paintOval:
  3010.                          key byte = $51;
  3011.                          Rect;
  3012.                          
  3013.                      case eraseOval:
  3014.                          key byte = $52;
  3015.                          Rect;
  3016.                          
  3017.                      case invertOval:
  3018.                          key byte = $53;
  3019.                          Rect;
  3020.                          
  3021.                      case fillOval:
  3022.                          key byte = $54;
  3023.                          Rect;
  3024.                      
  3025.                      case frameSameOval:
  3026.                          key byte = $58;
  3027.                          
  3028.                      case paintSameOval:
  3029.                          key byte = $59;
  3030.                          
  3031.                      case eraseSameOval:
  3032.                          key byte = $5A;
  3033.                          
  3034.                      case invertSameOval:
  3035.                          key byte = $5B;
  3036.                          
  3037.                      case fillSameOval:
  3038.                          key byte = $5C;
  3039.                      
  3040.                      case frameArc:
  3041.                          key byte = $60;
  3042.                          Rect;
  3043.                          integer;                /* startAngle */
  3044.                          integer;                /* arcAngle */
  3045.                      
  3046.                      case paintArc:
  3047.                          key byte = $61;
  3048.                          Rect;
  3049.                          integer;                /* startAngle */
  3050.                          integer;                /* arcAngle */
  3051.                      
  3052.                      case eraseArc:
  3053.                          key byte = $62;
  3054.                          Rect;
  3055.                          integer;                /* startAngle */
  3056.                          integer;                /* arcAngle */
  3057.                      
  3058.                      case invertArc:
  3059.                          key byte = $63;
  3060.                          Rect;
  3061.                          integer;                /* startAngle */
  3062.                          integer;                /* arcAngle */
  3063.                      
  3064.                      case fillArc:
  3065.                          key byte = $64;
  3066.                          Rect;
  3067.                          integer;                /* startAngle */
  3068.                          integer;                /* arcAngle */
  3069.                      
  3070.                      case frameSameArc:
  3071.                          key byte = $68;
  3072.                          integer;                /* startAngle */
  3073.                          integer;                /* arcAngle */
  3074.  
  3075.                      case paintSameArc:
  3076.                          key byte = $69;
  3077.                          integer;                /* startAngle */
  3078.                          integer;                /* arcAngle */
  3079.  
  3080.                      case eraseSameArc:
  3081.                          key byte = $6A;
  3082.                          integer;                /* startAngle */
  3083.                          integer;                /* arcAngle */
  3084.  
  3085.                      case invertSameArc:
  3086.                          key byte = $6B;
  3087.                          integer;                /* startAngle */
  3088.                          integer;                /* arcAngle */
  3089.  
  3090.                      case fillSameArc:
  3091.                          key byte = $6C;
  3092.                          integer;                /* startAngle */
  3093.                          integer;                /* arcAngle */
  3094.                      
  3095.                      case framePoly:
  3096.                          key byte = $70;
  3097.                          integer = $$CountOf(framePoly) * 4 + 10;
  3098.                          Rect;                   /* enclosing rectangle */
  3099.                          array framePoly {
  3100.                              Point;
  3101.                          };
  3102.                      
  3103.                      case paintPoly:
  3104.                          key byte = $71;
  3105.                          integer = $$CountOf(framePoly) * 4 + 10;
  3106.                          Rect;                   /* enclosing rectangle */
  3107.                          array framePoly {
  3108.                              Point;
  3109.                          };
  3110.                      
  3111.                      case erasePoly:
  3112.                          key byte = $72;
  3113.                          integer = $$CountOf(framePoly) * 4 + 10;
  3114.                          Rect;                   /* enclosing rectangle */
  3115.                          array framePoly {
  3116.                              Point;
  3117.                          };
  3118.                      
  3119.                      case invertPoly:
  3120.                          key byte = $73;
  3121.                          integer = $$CountOf(framePoly) * 4 + 10;
  3122.                          Rect;                   /* enclosing rectangle */
  3123.                          array framePoly {
  3124.                              Point;
  3125.                          };
  3126.                      
  3127.                      case fillPoly:
  3128.                          key byte = $74;
  3129.                          integer = $$CountOf(framePoly) * 4 + 10;
  3130.                          Rect;                   /* enclosing rectangle */
  3131.                          array framePoly {
  3132.                              Point;
  3133.                          };
  3134.                      
  3135.                      case frameSamePoly:
  3136.                          key byte = $78;
  3137.  
  3138.                      case paintSamePoly:
  3139.                          key byte = $79;
  3140.  
  3141.                      case eraseSamePoly:
  3142.                          key byte = $7A;
  3143.  
  3144.                      case invertSamePoly:
  3145.                          key byte = $7B;
  3146.  
  3147.                      case fillSamePoly:
  3148.                          key byte = $7C;
  3149.  
  3150.                      case frameRgn:
  3151.                          key byte = $80;
  3152.  frameRgnStart:          integer = (frameRgnEnd[$$ArrayIndex(OpCodes)] - frameRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3153.                          Rect;               /* region's enclosing rect */
  3154.                          hex string [$$Word(frameRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3155.  frameRgnEnd:
  3156.                      case paintRgn:
  3157.                          key byte = $81;
  3158.  paintRgnStart:          integer = (paintRgnEnd[$$ArrayIndex(OpCodes)] - paintRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3159.                          Rect;               /* region's enclosing rect */
  3160.                          hex string [$$Word(paintRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3161.  paintRgnEnd:
  3162.                      case eraseRgn:
  3163.                          key byte = $82;
  3164.  eraseRgnStart:          integer = (eraseRgnEnd[$$ArrayIndex(OpCodes)] - eraseRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3165.                          Rect;               /* region's enclosing rect */
  3166.                          hex string [$$Word(eraseRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3167.  eraseRgnEnd:
  3168.                      case invertRgn:
  3169.                          key byte = $83;
  3170.  invertRgnStart:         integer = (invertRgnEnd[$$ArrayIndex(OpCodes)] - invertRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3171.                          Rect;               /* region's enclosing rect */
  3172.                          hex string [$$Word(invertRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3173.  invertRgnEnd:
  3174.                      case fillRgn:
  3175.                          key byte = $84;
  3176.  fillRgnStart:           integer = (fillRgnEnd[$$ArrayIndex(OpCodes)] - fillRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3177.                          Rect;               /* region's enclosing rect */
  3178.                          hex string [$$Word(fillRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3179.  fillRgnEnd:
  3180.                      case frameSameRgn:
  3181.                          key byte = $88;
  3182.  
  3183.                      case paintSameRgn:
  3184.                          key byte = $89;
  3185.  
  3186.                      case eraseSameRgn:
  3187.                          key byte = $8A;
  3188.  
  3189.                      case invertSameRgn:
  3190.                          key byte = $8B;
  3191.  
  3192.                      case fillSameRgn:
  3193.                          key byte = $8C;
  3194.  
  3195.                      case bitsRect:
  3196.                          key byte = $90;
  3197.  BitsRectRowBytes:       integer;                    /* row bytes */
  3198.  BitsRectBounds:         Rect;                       /* bounds */
  3199.                          Rect;                       /* srcRect */
  3200.                          Rect;                       /* destRect */
  3201.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3202.                                      notSrcCopy, notSrcOr, notSrcXor,
  3203.                                      notSrcBic, patCopy, patOr, patXor,
  3204.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3205.                          hex string [($$BitField(BitsRectBounds[$$ArrayIndex(OpCodes)],32,16)
  3206.                                      - $$BitField(BitsRectBounds[$$ArrayIndex(OpCodes)],0,16))
  3207.                                      * $$Word(BitsRectRowBytes[$$ArrayIndex(OpCodes)])];
  3208.  
  3209.                      case bitsRgn:
  3210.                          key byte = $91;
  3211.  BitsRgnRowBytes:        integer;                    /* row bytes */
  3212.  BitsRgnBounds:          Rect;                       /* bounds */
  3213.                          Rect;                       /* srcRect */
  3214.                          Rect;                       /* destRect */
  3215.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3216.                                      notSrcCopy, notSrcOr, notSrcXor,
  3217.                                      notSrcBic, patCopy, patOr, patXor,
  3218.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3219.  bitsRgnStart:           integer = (bitsRgnEnd[$$ArrayIndex(OpCodes)] - bitsRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3220.                          Rect;               /* region's enclosing rect */
  3221.                          hex string [$$Word(bitsRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3222.  bitsRgnEnd:
  3223.                          hex string [($$BitField(BitsRgnBounds[$$ArrayIndex(OpCodes)],32,16)
  3224.                                      - $$BitField(BitsRgnBounds[$$ArrayIndex(OpCodes)],0,16))
  3225.                                      * $$Word(BitsRgnRowBytes[$$ArrayIndex(OpCodes)])];
  3226.  
  3227.                      case packBitsRect:
  3228.                          key byte = $98;
  3229.  PackBitsRectRowBytes:   integer;                    /* row bytes */
  3230.  PackBitsRectBounds:     Rect;                       /* bounds */
  3231.                          Rect;                       /* srcRect */
  3232.                          Rect;                       /* destRect */
  3233.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3234.                                      notSrcCopy, notSrcOr, notSrcXor,
  3235.                                      notSrcBic, patCopy, patOr, patXor,
  3236.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3237.  PackBitsBits:           hex string [$$PackedSize(PackBitsBits[$$ArrayIndex(OpCodes)],
  3238.                                      $$Word(PackBitsRectRowBytes[$$ArrayIndex(OpCodes)]),
  3239.                                      ($$BitField(PackBitsRectBounds[$$ArrayIndex(OpCodes)],32,16)
  3240.                                      - $$BitField(PackBitsRectBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3241.  
  3242.                      case packBitsRgn:
  3243.                          key byte = $99;
  3244.  packBitsRgnRowBytes:    integer;                    /* row bytes */
  3245.  packBitsRgnBounds:      Rect;                       /* bounds */
  3246.                          Rect;                       /* srcRect */
  3247.                          Rect;                       /* destRect */
  3248.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3249.                                      notSrcCopy, notSrcOr, notSrcXor,
  3250.                                      notSrcBic, patCopy, patOr, patXor,
  3251.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3252.  packBitsRgnStart:       integer = (packBitsRgnEnd[$$ArrayIndex(OpCodes)] - packBitsRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3253.                          Rect;               /* region's enclosing rect */
  3254.                          hex string [$$Word(packBitsRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3255.  packBitsRgnEnd:         hex string [$$PackedSize(packBitsRgnEnd[$$ArrayIndex(OpCodes)],
  3256.                                      $$Word(packBitsRgnRowBytes[$$ArrayIndex(OpCodes)]),
  3257.                                      ($$BitField(packBitsRgnBounds[$$ArrayIndex(OpCodes)],32,16)
  3258.                                      - $$BitField(packBitsRgnBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3259.  
  3260.                      case shortComment:
  3261.                          key byte = $A0;
  3262.                          integer;            /* kind */
  3263.  
  3264.                      case longComment:
  3265.                          key byte = $A1;
  3266.                          integer;            /* kind */
  3267.  longCommentStart:       integer = (longCommentEnd[$$ArrayIndex(OpCodes)] - longCommentStart[$$ArrayIndex(OpCodes)] - 16) >> 3;
  3268.                          hex string [$$Word(longCommentStart[$$ArrayIndex(OpCodes)])];
  3269.  longCommentEnd:
  3270.                  };
  3271.              };
  3272.              byte = $FF;     /* End of picture */
  3273.              
  3274.          case VersionTwo:
  3275.              key longint = $001102ff;        /* Version op + version */
  3276.              array OpCodes {
  3277.                  switch {
  3278.                      case Clip:
  3279.                          key integer = $0001;
  3280.  ClipStart:              integer = (ClipEnd[$$ArrayIndex(OpCodes)] - ClipStart[$$ArrayIndex(OpCodes)]) >> 3;
  3281.                          Rect;               /* region's enclosing rect */
  3282.                          hex string [$$Word(ClipStart[$$ArrayIndex(OpCodes)]) - 10];
  3283.  ClipEnd:
  3284.                      case BkPat:
  3285.                          key integer = $0002;
  3286.                          hex string [8];
  3287.                      
  3288.                      case TxFont:
  3289.                          key integer = $0003;
  3290.                          integer;            /* font */
  3291.                      
  3292.                      case TxFace:
  3293.                          key integer = $0004;
  3294.                          unsigned hex byte;  /* text face */
  3295.                      
  3296.                      case TxMode:
  3297.                          key integer = $0005;
  3298.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3299.                                      notSrcCopy, notSrcOr, notSrcXor,
  3300.                                      notSrcBic, patCopy, patOr, patXor,
  3301.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3302.                      
  3303.                      case SpExtra:
  3304.                          key integer = $0006;
  3305.                          unsigned hex longint;
  3306.                      
  3307.                      case PnSize:
  3308.                          key integer = $0007;
  3309.                          Point;
  3310.                      
  3311.                      case PnMode:
  3312.                          key integer = $0008;
  3313.                          unsigned hex integer;
  3314.                      
  3315.                      case PnPat:
  3316.                          key integer = $0009;
  3317.                          hex string [8];
  3318.                      
  3319.                      case FillPat:
  3320.                          key integer = $000A;
  3321.                          hex string [8];
  3322.                      
  3323.                      case OvSize:
  3324.                          key integer = $000B;
  3325.                          Point;
  3326.                      
  3327.                      case Origin:
  3328.                          key integer = $000C;
  3329.                          integer;            /* dh */
  3330.                          integer;            /* dv */
  3331.                      
  3332.                      case TxSize:
  3333.                          key integer = $000D;
  3334.                          integer;
  3335.                      
  3336.                      case FgColor:
  3337.                          key integer = $000E;
  3338.                          longint;
  3339.                      
  3340.                      case BkColor:
  3341.                          key integer = $000F;
  3342.                          longint;
  3343.                      
  3344.                      case TxRatio:
  3345.                          key integer = $0010;
  3346.                          Point;              /* numer */
  3347.                          Point;              /* denom */
  3348.                      
  3349.                      case Version:
  3350.                          key integer = $0011;
  3351.                          byte;
  3352.  
  3353.                      case BkPixPat:
  3354.                          key integer = $0012;
  3355.                          switch {
  3356.                              case newPattern:
  3357.                                  key integer = 1;
  3358.                                  hex string [8];         /* old-style pattern    */
  3359.                                  unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  3360.                                  unsigned bitstring[2] = 0;                              /* Must be 0            */
  3361.  BkPixPatpMapRowBytes:           unsigned bitstring[13];                                 /* Offset to next row   */
  3362.  BkPixPatBounds:                 rect;                                                   /* Bitmap bounds        */
  3363.                                  integer;                                                /* pixMap vers number   */
  3364.                                  integer unpacked;                                       /* Packing format       */
  3365.                                  unsigned longint;                                       /* Size of pixel data   */
  3366.                                  unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  3367.                                  unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  3368.                                  integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  3369.                                  integer;                                                /* # bits in pixel      */
  3370.                                  integer;                                                /* # components in pixel*/
  3371.                                  integer;                                                /* # bits per field     */
  3372.                                  unsigned longint;                                       /* Offset to next plane */
  3373.                                  unsigned longint;                                       /* Offset to color table*/
  3374.                                  fill long;                                              /* Reserved             */
  3375.                                  /* Color Table */
  3376.                                  unsigned hex longint;                                   /* ctSeed               */
  3377.                                  integer;                                                /* ctFlags              */
  3378.                                  integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  3379.                                  wide array ColorSpec {
  3380.                                          integer;                                        /* value                */
  3381.                                          unsigned integer;                               /* RGB: red             */
  3382.                                          unsigned integer;                               /*      green           */
  3383.                                          unsigned integer;                               /*      blue            */
  3384.                                  };
  3385.                                  /* If rowBytes < 8 then data is unpacked,
  3386.                                     if >= 8, then data is packed */
  3387.  BkPixPatBits:                   hex string [($$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
  3388.                                              $$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
  3389.                                              ($$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
  3390.                                              $$PackedSize(BkPixPatBits[$$ArrayIndex(OpCodes)],
  3391.                                              $$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  3392.                                              ($$BitField(BkPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
  3393.                                              - $$BitField(BkPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3394.                              
  3395.                              case ditherPattern:
  3396.                                  key integer = 2;
  3397.                                  hex string [8];         /* old-style pattern    */
  3398.                                  unsigned integer;       /* RGB: red             */
  3399.                                  unsigned integer;       /*      green           */
  3400.                                  unsigned integer;       /*      blue            */
  3401.                          };
  3402.  
  3403.                      case PnPixPat:
  3404.                          key integer = $0013;
  3405.                          switch {
  3406.                              case newPattern:
  3407.                                  key integer = 1;
  3408.                                  hex string [8];         /* old-style pattern    */
  3409.                                  unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  3410.                                  unsigned bitstring[2] = 0;                              /* Must be 0            */
  3411.  PnPixPatpMapRowBytes:           unsigned bitstring[13];                                 /* Offset to next row   */
  3412.  PnPixPatBounds:                 rect;                                                   /* Bitmap bounds        */
  3413.                                  integer;                                                /* pixMap vers number   */
  3414.                                  integer unpacked;                                       /* Packing format       */
  3415.                                  unsigned longint;                                       /* Size of pixel data   */
  3416.                                  unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  3417.                                  unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  3418.                                  integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  3419.                                  integer;                                                /* # bits in pixel      */
  3420.                                  integer;                                                /* # components in pixel*/
  3421.                                  integer;                                                /* # bits per field     */
  3422.                                  unsigned longint;                                       /* Offset to next plane */
  3423.                                  unsigned longint;                                       /* Offset to color table*/
  3424.                                  fill long;                                              /* Reserved             */
  3425.                                  /* Color Table */
  3426.                                  unsigned hex longint;                                   /* ctSeed               */
  3427.                                  integer;                                                /* ctFlags              */
  3428.                                  integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  3429.                                  wide array ColorSpec {
  3430.                                          integer;                                        /* value                */
  3431.                                          unsigned integer;                               /* RGB: red             */
  3432.                                          unsigned integer;                               /*      green           */
  3433.                                          unsigned integer;                               /*      blue            */
  3434.                                  };
  3435.                                  /* If rowBytes < 8 then data is unpacked,
  3436.                                     if >= 8, then data is packed */
  3437.  PnPixPatBits:                   hex string [($$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
  3438.                                              $$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
  3439.                                              ($$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
  3440.                                              $$PackedSize(PnPixPatBits[$$ArrayIndex(OpCodes)],
  3441.                                              $$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  3442.                                              ($$BitField(PnPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
  3443.                                              - $$BitField(PnPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3444.                              
  3445.                              case ditherPattern:
  3446.                                  key integer = 2;
  3447.                                  hex string [8];         /* old-style pattern    */
  3448.                                  unsigned integer;       /* RGB: red             */
  3449.                                  unsigned integer;       /*      green           */
  3450.                                  unsigned integer;       /*      blue            */
  3451.                          };
  3452.  
  3453.                      case FillPixPat:
  3454.                          key integer = $0014;
  3455.                          switch {
  3456.                              case newPattern:
  3457.                                  key integer = 1;
  3458.                                  hex string [8];         /* old-style pattern    */
  3459.                                  unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  3460.                                  unsigned bitstring[2] = 0;                              /* Must be 0            */
  3461.  FillPixPatpMapRowBytes:         unsigned bitstring[13];                                 /* Offset to next row   */
  3462.  FillPixPatBounds:                   rect;                                                   /* Bitmap bounds        */
  3463.                                  integer;                                                /* pixMap vers number   */
  3464.                                  integer unpacked;                                       /* Packing format       */
  3465.                                  unsigned longint;                                       /* Size of pixel data   */
  3466.                                  unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  3467.                                  unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  3468.                                  integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  3469.                                  integer;                                                /* # bits in pixel      */
  3470.                                  integer;                                                /* # components in pixel*/
  3471.                                  integer;                                                /* # bits per field     */
  3472.                                  unsigned longint;                                       /* Offset to next plane */
  3473.                                  unsigned longint;                                       /* Offset to color table*/
  3474.                                  fill long;                                              /* Reserved             */
  3475.                                  /* Color Table */
  3476.                                  unsigned hex longint;                                   /* ctSeed               */
  3477.                                  integer;                                                /* ctFlags              */
  3478.                                  integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  3479.                                  wide array ColorSpec {
  3480.                                          integer;                                        /* value                */
  3481.                                          unsigned integer;                               /* RGB: red             */
  3482.                                          unsigned integer;                               /*      green           */
  3483.                                          unsigned integer;                               /*      blue            */
  3484.                                  };
  3485.                                  /* If rowBytes < 8 then data is unpacked,
  3486.                                     if >= 8, then data is packed */
  3487.  FillPixPatBits:                 hex string [($$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
  3488.                                              $$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
  3489.                                              ($$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
  3490.                                              $$PackedSize(FillPixPatBits[$$ArrayIndex(OpCodes)],
  3491.                                              $$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  3492.                                              ($$BitField(FillPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
  3493.                                              - $$BitField(FillPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3494.                              
  3495.                              case ditherPattern:
  3496.                                  key integer = 2;
  3497.                                  hex string [8];         /* old-style pattern    */
  3498.                                  unsigned integer;       /* RGB: red             */
  3499.                                  unsigned integer;       /*      green           */
  3500.                                  unsigned integer;       /*      blue            */
  3501.                          };
  3502.                      
  3503.                      case PnLocHFrac:
  3504.                          key integer = $0015;
  3505.                          unsigned hex integer;
  3506.                      
  3507.                      case ChExtra:
  3508.                          key integer = $0016;
  3509.                          integer;                        /* extra for each character */
  3510.                      
  3511.                      case AppleReserved0017:
  3512.                          key integer = $0017;
  3513.                          
  3514.                      case AppleReserved0018:
  3515.                          key integer = $0018;
  3516.                          
  3517.                      case AppleReserved0019:
  3518.                          key integer = $0019;
  3519.                      
  3520.                      case RGBFgCol:
  3521.                          key integer = $001A;
  3522.                          unsigned integer;       /* RGB: red             */
  3523.                          unsigned integer;       /*      green           */
  3524.                          unsigned integer;       /*      blue            */
  3525.                          
  3526.                      case RGBBkCol:
  3527.                          key integer = $001B;
  3528.                          unsigned integer;       /* RGB: red             */
  3529.                          unsigned integer;       /*      green           */
  3530.                          unsigned integer;       /*      blue            */
  3531.                          
  3532.                      case HiliteMode:
  3533.                          key integer = $001C;
  3534.                      
  3535.                      case HiliteColor:
  3536.                          key integer = $001D;
  3537.                          unsigned integer;       /* RGB: red             */
  3538.                          unsigned integer;       /*      green           */
  3539.                          unsigned integer;       /*      blue            */
  3540.                      
  3541.                      case DefHilite:
  3542.                          key integer = $001E;
  3543.                      
  3544.                      case OpColor:
  3545.                          key integer = $001F;
  3546.                          unsigned integer;       /* RGB: red             */
  3547.                          unsigned integer;       /*      green           */
  3548.                          unsigned integer;       /*      blue            */
  3549.                      
  3550.                      case Line:
  3551.                          key integer = $0020;
  3552.                          Point;                  /* pnLoc */
  3553.                          Point;                  /* newPt */
  3554.                          
  3555.                      case LineFrom:
  3556.                          key integer = $0021;
  3557.                          Point;                  /* newPt */
  3558.                      
  3559.                      case ShortLine:
  3560.                          key integer = $0022;
  3561.                          Point;                  /* pnLoc */
  3562.                          byte;                   /* dh */
  3563.                          byte;                   /* dv */
  3564.                      
  3565.                      case ShortLineFrom:
  3566.                          key integer = $0023;
  3567.                          byte;                   /* dh */
  3568.                          byte;                   /* dv */
  3569.                      
  3570.                      case AppleReserved0024:
  3571.                          key integer = $0024;
  3572.              AR24:       unsigned integer = (AR24End - AR24) / 8 - 2;
  3573.                          hex string [$$Word(AR24)];
  3574.              AR24End:
  3575.                      
  3576.                      case AppleReserved0025:
  3577.                          key integer = $0025;
  3578.              AR25:       unsigned integer = (AR25End - AR25) / 8 - 2;
  3579.                          hex string [$$Word(AR25)];
  3580.              AR25End:
  3581.                      
  3582.                      case AppleReserved0026:
  3583.                          key integer = $0026;
  3584.              AR26:       unsigned integer = (AR26End - AR26) / 8 - 2;
  3585.                          hex string [$$Word(AR26)];
  3586.              AR26End:
  3587.                      
  3588.                      case AppleReserved0027:
  3589.                          key integer = $0027;
  3590.              AR27:       unsigned integer = (AR27End - AR27) / 8 - 2;
  3591.                          hex string [$$Word(AR27)];
  3592.              AR27End:
  3593.                      
  3594.                      case LongText:
  3595.                          key integer = $0028;
  3596.                          Point;              /* txLoc */
  3597.                          pstring;            /* text */
  3598.                      
  3599.                      case DHText:
  3600.                          key integer = $0029;
  3601.                          byte;               /* dh */
  3602.                          pstring;            /* text */
  3603.  
  3604.                      case DVText:
  3605.                          key integer = $002A;
  3606.                          byte;               /* dv */
  3607.                          pstring;            /* text */
  3608.  
  3609.                      case DHDVText:
  3610.                          key integer = $002A;
  3611.                          byte;               /* dh */
  3612.                          byte;               /* dv */
  3613.                          pstring;            /* text */
  3614.  
  3615.                      case AppleReserved002C:
  3616.                          key integer = $002C;
  3617.              AR2C:       unsigned integer = (AR2CEnd - AR2C) / 8 - 2;
  3618.                          hex string [$$Word(AR2C)];
  3619.              AR2CEnd:
  3620.                      
  3621.                      case AppleReserved002D:
  3622.                          key integer = $002D;
  3623.              AR2D:       unsigned integer = (AR2DEnd - AR2D) / 8 - 2;
  3624.                          hex string [$$Word(AR2D)];
  3625.              AR2DEnd:
  3626.                      
  3627.                      case AppleReserved002E:
  3628.                          key integer = $002E;
  3629.              AR2E:       unsigned integer = (AR2EEnd - AR2E) / 8 - 2;
  3630.                          hex string [$$Word(AR2E)];
  3631.              AR2EEnd:
  3632.                      
  3633.                      case AppleReserved002F:
  3634.                          key integer = $002F;
  3635.              AR2F:       unsigned integer = (AR2FEnd - AR2F) / 8 - 2;
  3636.                          hex string [$$Word(AR2F)];
  3637.              AR2FEnd:
  3638.                      
  3639.                      case FrameRect:
  3640.                          key integer = $0030;
  3641.                          Rect;
  3642.                          
  3643.                      case PaintRect:
  3644.                          key integer = $0031;
  3645.                          Rect;
  3646.                          
  3647.                      case EraseRect:
  3648.                          key integer = $0032;
  3649.                          Rect;
  3650.                          
  3651.                      case InvertRect:
  3652.                          key integer = $0033;
  3653.                          Rect;
  3654.                          
  3655.                      case FillRect:
  3656.                          key integer = $0034;
  3657.                          Rect;
  3658.                          
  3659.                      case AppleReserved0035:
  3660.                          key integer = $0035;
  3661.                          Rect;
  3662.                          
  3663.                      case AppleReserved0036:
  3664.                          key integer = $0036;
  3665.                          Rect;
  3666.                          
  3667.                      case AppleReserved0037:
  3668.                          key integer = $0037;
  3669.                          Rect;
  3670.                      
  3671.                      case FrameSameRect:
  3672.                          key integer = $0038;
  3673.                      
  3674.                      case PaintSameRect:
  3675.                          key integer = $0039;
  3676.                      
  3677.                      case EraseSameRect:
  3678.                          key integer = $003A;
  3679.                      
  3680.                      case InvertSameRect:
  3681.                          key integer = $003B;
  3682.                      
  3683.                      case FillSameRect:
  3684.                          key integer = $003C;
  3685.                      
  3686.                      case AppleReserved003D:
  3687.                          key integer = $003D;
  3688.                      
  3689.                      case AppleReserved003E:
  3690.                          key integer = $003E;
  3691.                      
  3692.                      case AppleReserved003F:
  3693.                          key integer = $003F;
  3694.                      
  3695.                      case FrameRRect:
  3696.                          key integer = $0040;
  3697.                          Rect;
  3698.                          
  3699.                      case PaintRRect:
  3700.                          key integer = $0041;
  3701.                          Rect;
  3702.                          
  3703.                      case EraseRRect:
  3704.                          key integer = $0042;
  3705.                          Rect;
  3706.                          
  3707.                      case InvertRRect:
  3708.                          key integer = $0043;
  3709.                          Rect;
  3710.                          
  3711.                      case FillRRect:
  3712.                          key integer = $0044;
  3713.                          Rect;
  3714.                          
  3715.                      case AppleReserved0045:
  3716.                          key integer = $0045;
  3717.                          Rect;
  3718.                          
  3719.                      case AppleReserved0046:
  3720.                          key integer = $0046;
  3721.                          Rect;
  3722.                          
  3723.                      case AppleReserved0047:
  3724.                          key integer = $0047;
  3725.                          Rect;
  3726.                      
  3727.                      case FrameSameRRect:
  3728.                          key integer = $0048;
  3729.                      
  3730.                      case PaintSameRRect:
  3731.                          key integer = $0049;
  3732.                      
  3733.                      case EraseSameRRect:
  3734.                          key integer = $004A;
  3735.                      
  3736.                      case InvertSameRRect:
  3737.                          key integer = $004B;
  3738.                      
  3739.                      case FillSameRRect:
  3740.                          key integer = $004C;
  3741.                      
  3742.                      case AppleReserved004D:
  3743.                          key integer = $004D;
  3744.                      
  3745.                      case AppleReserved004E:
  3746.                          key integer = $004E;
  3747.                      
  3748.                      case AppleReserved004F:
  3749.                          key integer = $004F;
  3750.                      
  3751.                      case FrameOval:
  3752.                          key integer = $0050;
  3753.                          Rect;
  3754.                          
  3755.                      case PaintOval:
  3756.                          key integer = $0051;
  3757.                          Rect;
  3758.                          
  3759.                      case EraseOval:
  3760.                          key integer = $0052;
  3761.                          Rect;
  3762.                          
  3763.                      case InvertOval:
  3764.                          key integer = $0053;
  3765.                          Rect;
  3766.                          
  3767.                      case FillOval:
  3768.                          key integer = $0054;
  3769.                          Rect;
  3770.                          
  3771.                      case AppleReserved0055:
  3772.                          key integer = $0055;
  3773.                          Rect;
  3774.                          
  3775.                      case AppleReserved0056:
  3776.                          key integer = $0056;
  3777.                          Rect;
  3778.                          
  3779.                      case AppleReserved0057:
  3780.                          key integer = $0057;
  3781.                          Rect;
  3782.                      
  3783.                      case FrameSameOval:
  3784.                          key integer = $0058;
  3785.                      
  3786.                      case PaintSameOval:
  3787.                          key integer = $0059;
  3788.                      
  3789.                      case EraseSameOval:
  3790.                          key integer = $005A;
  3791.                      
  3792.                      case InvertSameOval:
  3793.                          key integer = $005B;
  3794.                      
  3795.                      case FillSameOval:
  3796.                          key integer = $005C;
  3797.                      
  3798.                      case AppleReserved005D:
  3799.                          key integer = $005D;
  3800.                      
  3801.                      case AppleReserved005E:
  3802.                          key integer = $005E;
  3803.                      
  3804.                      case frameArc:
  3805.                          key integer = $0060;
  3806.                          Rect;
  3807.                          integer;                /* startAngle */
  3808.                          integer;                /* arcAngle */
  3809.                      
  3810.                      case paintArc:
  3811.                          key integer = $0061;
  3812.                          Rect;
  3813.                          integer;                /* startAngle */
  3814.                          integer;                /* arcAngle */
  3815.                      
  3816.                      case eraseArc:
  3817.                          key integer = $0062;
  3818.                          Rect;
  3819.                          integer;                /* startAngle */
  3820.                          integer;                /* arcAngle */
  3821.                      
  3822.                      case invertArc:
  3823.                          key integer = $0063;
  3824.                          Rect;
  3825.                          integer;                /* startAngle */
  3826.                          integer;                /* arcAngle */
  3827.                      
  3828.                      case fillArc:
  3829.                          key integer = $0064;
  3830.                          Rect;
  3831.                          integer;                /* startAngle */
  3832.                          integer;                /* arcAngle */
  3833.                      
  3834.                      case AppleReserved0065:
  3835.                          key integer = $0065;
  3836.                          Rect;
  3837.                          integer;                /* startAngle */
  3838.                          integer;                /* arcAngle */
  3839.                      
  3840.                      case AppleReserved0066:
  3841.                          key integer = $0066;
  3842.                          Rect;
  3843.                          integer;                /* startAngle */
  3844.                          integer;                /* arcAngle */
  3845.                      
  3846.                      case AppleReserved0067:
  3847.                          key integer = $0067;
  3848.                          Rect;
  3849.                          integer;                /* startAngle */
  3850.                          integer;                /* arcAngle */
  3851.                      
  3852.                      case frameSameArc:
  3853.                          key integer = $0068;
  3854.                          integer;                /* startAngle */
  3855.                          integer;                /* arcAngle */
  3856.  
  3857.                      case paintSameArc:
  3858.                          key integer = $0069;
  3859.                          integer;                /* startAngle */
  3860.                          integer;                /* arcAngle */
  3861.  
  3862.                      case eraseSameArc:
  3863.                          key integer = $006A;
  3864.                          integer;                /* startAngle */
  3865.                          integer;                /* arcAngle */
  3866.  
  3867.                      case invertSameArc:
  3868.                          key integer = $006B;
  3869.                          integer;                /* startAngle */
  3870.                          integer;                /* arcAngle */
  3871.  
  3872.                      case fillSameArc:
  3873.                          key integer = $006C;
  3874.                          integer;                /* startAngle */
  3875.                          integer;                /* arcAngle */
  3876.                      
  3877.                      case AppleReserved006D:
  3878.                          key integer = $006D;
  3879.                          integer;                /* startAngle */
  3880.                          integer;                /* arcAngle */
  3881.                      
  3882.                      case AppleReserved006E:
  3883.                          key integer = $006E;
  3884.                          integer;                /* startAngle */
  3885.                          integer;                /* arcAngle */
  3886.                      
  3887.                      case AppleReserved006F:
  3888.                          key integer = $006F;
  3889.                          integer;                /* startAngle */
  3890.                          integer;                /* arcAngle */
  3891.                      
  3892.                      case framePoly:
  3893.                          key integer = $0070;
  3894.                          integer = $$CountOf(framePoly) * 4 + 10;
  3895.                          Rect;                   /* enclosing rectangle */
  3896.                          array framePoly {
  3897.                              Point;
  3898.                          };
  3899.                      
  3900.                      case paintPoly:
  3901.                          key integer = $0071;
  3902.                          integer = $$CountOf(framePoly) * 4 + 10;
  3903.                          Rect;                   /* enclosing rectangle */
  3904.                          array framePoly {
  3905.                              Point;
  3906.                          };
  3907.                      
  3908.                      case erasePoly:
  3909.                          key integer = $0072;
  3910.                          integer = $$CountOf(framePoly) * 4 + 10;
  3911.                          Rect;                   /* enclosing rectangle */
  3912.                          array framePoly {
  3913.                              Point;
  3914.                          };
  3915.                      
  3916.                      case invertPoly:
  3917.                          key integer = $0073;
  3918.                          integer = $$CountOf(framePoly) * 4 + 10;
  3919.                          Rect;                   /* enclosing rectangle */
  3920.                          array framePoly {
  3921.                              Point;
  3922.                          };
  3923.                      
  3924.                      case fillPoly:
  3925.                          key integer = $0074;
  3926.                          integer = $$CountOf(framePoly) * 4 + 10;
  3927.                          Rect;                   /* enclosing rectangle */
  3928.                          array framePoly {
  3929.                              Point;
  3930.                          };
  3931.                      
  3932.                      case AppleReserved0075:
  3933.                          key integer = $0075;
  3934.                          integer = $$CountOf(framePoly) * 4 + 10;
  3935.                          Rect;                   /* enclosing rectangle */
  3936.                          array framePoly {
  3937.                              Point;
  3938.                          };
  3939.                      
  3940.                      case AppleReserved0076:
  3941.                          key integer = $0076;
  3942.                          integer = $$CountOf(framePoly) * 4 + 10;
  3943.                          Rect;                   /* enclosing rectangle */
  3944.                          array framePoly {
  3945.                              Point;
  3946.                          };
  3947.                      
  3948.                      case AppleReserved0077:
  3949.                          key integer = $0077;
  3950.                          integer = $$CountOf(framePoly) * 4 + 10;
  3951.                          Rect;                   /* enclosing rectangle */
  3952.                          array framePoly {
  3953.                              Point;
  3954.                          };
  3955.                      
  3956.                      case frameSamePoly:
  3957.                          key integer = $0078;
  3958.  
  3959.                      case paintSamePoly:
  3960.                          key integer = $0079;
  3961.  
  3962.                      case eraseSamePoly:
  3963.                          key integer = $007A;
  3964.  
  3965.                      case invertSamePoly:
  3966.                          key integer = $007B;
  3967.  
  3968.                      case fillSamePoly:
  3969.                          key integer = $007C;
  3970.  
  3971.                      case AppleReserved007D:
  3972.                          key integer = $007D;
  3973.  
  3974.                      case AppleReserved007E:
  3975.                          key integer = $007E;
  3976.  
  3977.                      case AppleReserved007F:
  3978.                          key integer = $007F;
  3979.  
  3980.                      case frameRgn:
  3981.                          key integer = $0080;
  3982.  frameRgnStart2:         integer = (frameRgnEnd2[$$ArrayIndex(OpCodes)] - frameRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  3983.                          Rect;               /* region's enclosing rect */
  3984.                          hex string [$$Word(frameRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  3985.  frameRgnEnd2:
  3986.                      case paintRgn:
  3987.                          key integer = $0081;
  3988.  paintRgnStart2:         integer = (paintRgnEnd2[$$ArrayIndex(OpCodes)] - paintRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  3989.                          Rect;               /* region's enclosing rect */
  3990.                          hex string [$$Word(paintRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  3991.  paintRgnEnd2:
  3992.                      case eraseRgn:
  3993.                          key integer = $0082;
  3994.  eraseRgnStart2:         integer = (eraseRgnEnd2[$$ArrayIndex(OpCodes)] - eraseRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  3995.                          Rect;               /* region's enclosing rect */
  3996.                          hex string [$$Word(eraseRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  3997.  eraseRgnEnd2:
  3998.                      case invertRgn:
  3999.                          key integer = $0083;
  4000.  invertRgnStart2:        integer = (invertRgnEnd2[$$ArrayIndex(OpCodes)] - invertRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4001.                          Rect;               /* region's enclosing rect */
  4002.                          hex string [$$Word(invertRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4003.  invertRgnEnd2:
  4004.                      case fillRgn:
  4005.                          key integer = $0084;
  4006.  fillRgnStart2:          integer = (fillRgnEnd2[$$ArrayIndex(OpCodes)] - fillRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4007.                          Rect;               /* region's enclosing rect */
  4008.                          hex string [$$Word(fillRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4009.  fillRgnEnd2:
  4010.                      case AppleReserved0085:
  4011.                          key integer = $0085;
  4012.  AppleReserved0085Start:integer = (AppleReserved0085End[$$ArrayIndex(OpCodes)] - AppleReserved0085Start[$$ArrayIndex(OpCodes)]) >> 3;
  4013.                          Rect;               /* region's enclosing rect */
  4014.                          hex string [$$Word(AppleReserved0085Start[$$ArrayIndex(OpCodes)]) - 10];
  4015.  AppleReserved0085End:
  4016.                      case AppleReserved0086:
  4017.                          key integer = $0086;
  4018.  AppleReserved0086Start: integer = (AppleReserved0086End[$$ArrayIndex(OpCodes)] - AppleReserved0086Start[$$ArrayIndex(OpCodes)]) >> 3;
  4019.                          Rect;               /* region's enclosing rect */
  4020.                          hex string [$$Word(AppleReserved0086Start[$$ArrayIndex(OpCodes)]) - 10];
  4021.  AppleReserved0086End:
  4022.                      case AppleReserved0087:
  4023.                          key integer = $0087;
  4024.  AppleReserved0087Start: integer = (AppleReserved0087End[$$ArrayIndex(OpCodes)] - AppleReserved0087Start[$$ArrayIndex(OpCodes)]) >> 3;
  4025.                          Rect;               /* region's enclosing rect */
  4026.                          hex string [$$Word(AppleReserved0087Start[$$ArrayIndex(OpCodes)]) - 10];
  4027.  AppleReserved0087End:
  4028.                      case frameSameRgn:
  4029.                          key integer = $0088;
  4030.  
  4031.                      case paintSameRgn:
  4032.                          key integer = $0089;
  4033.  
  4034.                      case eraseSameRgn:
  4035.                          key integer = $008A;
  4036.  
  4037.                      case invertSameRgn:
  4038.                          key integer = $008B;
  4039.  
  4040.                      case fillSameRgn:
  4041.                          key integer = $008C;
  4042.  
  4043.                      case AppleReserved008D:
  4044.                          key integer = $008D;
  4045.  
  4046.                      case AppleReserved008E:
  4047.                          key integer = $008E;
  4048.  
  4049.                      case AppleReserved008F:
  4050.                          key integer = $008F;
  4051.  
  4052.                      case BitsRect:
  4053.                          key integer = $0090;
  4054.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4055.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4056.  BitsRectpMapRowBytes:   unsigned bitstring[13];                                 /* Offset to next row   */
  4057.  BitsRectBounds2:        rect;                                                   /* Bitmap bounds        */
  4058.                          integer;                                                /* pixMap vers number   */
  4059.                          integer unpacked;                                       /* Packing format       */
  4060.                          unsigned longint;                                       /* Size of pixel data   */
  4061.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4062.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4063.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4064.                          integer;                                                /* # bits in pixel      */
  4065.                          integer;                                                /* # components in pixel*/
  4066.                          integer;                                                /* # bits per field     */
  4067.                          unsigned longint;                                       /* Offset to next plane */
  4068.                          unsigned longint;                                       /* Offset to color table*/
  4069.                          fill long;                                              /* Reserved             */
  4070.                          /* Color Table */
  4071.                          unsigned hex longint;                                   /* ctSeed               */
  4072.                          integer;                                                /* ctFlags              */
  4073.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4074.                          wide array ColorSpec {
  4075.                                  integer;                                        /* value                */
  4076.                                  unsigned integer;                               /* RGB: red             */
  4077.                                  unsigned integer;                               /*      green           */
  4078.                                  unsigned integer;                               /*      blue            */
  4079.                          };
  4080.                          Rect;                       /* srcRect */
  4081.                          Rect;                       /* destRect */
  4082.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4083.                                      notSrcCopy, notSrcOr, notSrcXor,
  4084.                                      notSrcBic, patCopy, patOr, patXor,
  4085.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4086.                                      blend = 32, addPin, addOver, subPin,
  4087.                                      adMax = 37, subOver, adMin;
  4088.  BitsRectBits:           hex string [$$BitField(BitsRectpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) *
  4089.                                      ($$BitField(BitsRectBounds2[$$ArrayIndex(OpCodes)],32,16)
  4090.                                      - $$BitField(BitsRectBounds2[$$ArrayIndex(OpCodes)],0,16))];
  4091.                      
  4092.                      
  4093.                      case BitsRgn:
  4094.                          key integer = $0091;
  4095.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4096.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4097.  BitsRgnpMapRowBytes:    unsigned bitstring[13];                                 /* Offset to next row   */
  4098.  BitsRgnBounds2:         rect;                                                   /* Bitmap bounds        */
  4099.                          integer;                                                /* pixMap vers number   */
  4100.                          integer unpacked;                                       /* Packing format       */
  4101.                          unsigned longint;                                       /* Size of pixel data   */
  4102.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4103.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4104.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4105.                          integer;                                                /* # bits in pixel      */
  4106.                          integer;                                                /* # components in pixel*/
  4107.                          integer;                                                /* # bits per field     */
  4108.                          unsigned longint;                                       /* Offset to next plane */
  4109.                          unsigned longint;                                       /* Offset to color table*/
  4110.                          fill long;                                              /* Reserved             */
  4111.                          /* Color Table */
  4112.                          unsigned hex longint;                                   /* ctSeed               */
  4113.                          integer;                                                /* ctFlags              */
  4114.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4115.                          wide array ColorSpec {
  4116.                                  integer;                                        /* value                */
  4117.                                  unsigned integer;                               /* RGB: red             */
  4118.                                  unsigned integer;                               /*      green           */
  4119.                                  unsigned integer;                               /*      blue            */
  4120.                          };
  4121.                          Rect;                       /* srcRect */
  4122.                          Rect;                       /* destRect */
  4123.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4124.                                      notSrcCopy, notSrcOr, notSrcXor,
  4125.                                      notSrcBic, patCopy, patOr, patXor,
  4126.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4127.                                      blend = 32, addPin, addOver, subPin,
  4128.                                      adMax = 37, subOver, adMin;
  4129.  BitsRgnStart2:          integer = (BitsRgnEnd2[$$ArrayIndex(OpCodes)] - BitsRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4130.                          Rect;               /* region's enclosing rect */
  4131.                          hex string [$$Word(BitsRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4132.  BitsRgnEnd2:            hex string [$$PackedSize(BitsRgnEnd2[$$ArrayIndex(OpCodes)],
  4133.                                      $$BitField(BitsRgnpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  4134.                                      ($$BitField(BitsRgnBounds2[$$ArrayIndex(OpCodes)],32,16)
  4135.                                      - $$BitField(BitsRgnBounds2[$$ArrayIndex(OpCodes)],0,16)))];
  4136.  
  4137.                      case AppleReserved0092:
  4138.                          key integer = $0092;
  4139.  AppleReserved0092Start: unsigned integer = (AppleReserved0092End[$$ArrayIndex(OpCodes)] - AppleReserved0092Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4140.                          hex string [$$Word(AppleReserved0092Start[$$ArrayIndex(OpCodes)])];
  4141.  AppleReserved0092End:
  4142.                      case AppleReserved0093:
  4143.                          key integer = $0093;
  4144.  AppleReserved0093Start: unsigned integer = (AppleReserved0093End[$$ArrayIndex(OpCodes)] - AppleReserved0093Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4145.                          hex string [$$Word(AppleReserved0093Start[$$ArrayIndex(OpCodes)])];
  4146.  AppleReserved0093End:
  4147.                      case AppleReserved0094:
  4148.                          key integer = $0094;
  4149.  AppleReserved0094Start: unsigned integer = (AppleReserved0094End[$$ArrayIndex(OpCodes)] - AppleReserved0094Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4150.                          hex string [$$Word(AppleReserved0094Start[$$ArrayIndex(OpCodes)])];
  4151.  AppleReserved0094End:
  4152.                      case AppleReserved0095:
  4153.                          key integer = $0095;
  4154.  AppleReserved0095Start: unsigned integer = (AppleReserved0095End[$$ArrayIndex(OpCodes)] - AppleReserved0095Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4155.                          hex string [$$Word(AppleReserved0095Start[$$ArrayIndex(OpCodes)])];
  4156.  AppleReserved0095End:
  4157.                      case AppleReserved0096:
  4158.                          key integer = $0096;
  4159.  AppleReserved0096Start: unsigned integer = (AppleReserved0096End[$$ArrayIndex(OpCodes)] - AppleReserved0096Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4160.                          hex string [$$Word(AppleReserved0096Start[$$ArrayIndex(OpCodes)])];
  4161.  AppleReserved0096End:
  4162.                      case AppleReserved0097:
  4163.                          key integer = $0097;
  4164.  AppleReserved0097Start: unsigned integer = (AppleReserved0097End[$$ArrayIndex(OpCodes)] - AppleReserved0097Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4165.                          hex string [$$Word(AppleReserved0097Start[$$ArrayIndex(OpCodes)])];
  4166.  AppleReserved0097End:
  4167.                      case PackBitsRect:
  4168.                          key integer = $0098;
  4169.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4170.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4171.  PackBitsRectpMapRowBytes:unsigned bitstring[13];                                    /* Offset to next row   */
  4172.  PackBitsRectBounds2:    rect;                                                   /* Bitmap bounds        */
  4173.                          integer;                                                /* pixMap vers number   */
  4174.                          integer unpacked;                                       /* Packing format       */
  4175.                          unsigned longint;                                       /* Size of pixel data   */
  4176.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4177.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4178.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4179.                          integer;                                                /* # bits in pixel      */
  4180.                          integer;                                                /* # components in pixel*/
  4181.                          integer;                                                /* # bits per field     */
  4182.                          unsigned longint;                                       /* Offset to next plane */
  4183.                          unsigned longint;                                       /* Offset to color table*/
  4184.                          fill long;                                              /* Reserved             */
  4185.                          /* Color Table */
  4186.                          unsigned hex longint;                                   /* ctSeed               */
  4187.                          integer;                                                /* ctFlags              */
  4188.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4189.                          wide array ColorSpec {
  4190.                                  integer;                                        /* value                */
  4191.                                  unsigned integer;                               /* RGB: red             */
  4192.                                  unsigned integer;                               /*      green           */
  4193.                                  unsigned integer;                               /*      blue            */
  4194.                          };
  4195.                          Rect;                       /* srcRect */
  4196.                          Rect;                       /* destRect */
  4197.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4198.                                      notSrcCopy, notSrcOr, notSrcXor,
  4199.                                      notSrcBic, patCopy, patOr, patXor,
  4200.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4201.                                      blend = 32, addPin, addOver, subPin,
  4202.                                      adMax = 37, subOver, adMin;
  4203.  PackBitsRectBits:       hex string [$$PackedSize(PackBitsRectBits[$$ArrayIndex(OpCodes)],
  4204.                                      $$BitField(PackBitsRectpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  4205.                                      ($$BitField(PackBitsRectBounds2[$$ArrayIndex(OpCodes)],32,16)
  4206.                                      - $$BitField(PackBitsRectBounds2[$$ArrayIndex(OpCodes)],0,16)))];
  4207.                      
  4208.                      case PackBitsRgn:
  4209.                          key integer = $0099;
  4210.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4211.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4212.  PackBitsRgnpMapRowBytes:unsigned bitstring[13];                                 /* Offset to next row   */
  4213.  PackBitsRgnBounds2: rect;                                                       /* Bitmap bounds        */
  4214.                          integer;                                                /* pixMap vers number   */
  4215.                          integer unpacked;                                       /* Packing format       */
  4216.                          unsigned longint;                                       /* Size of pixel data   */
  4217.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4218.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4219.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4220.                          integer;                                                /* # bits in pixel      */
  4221.                          integer;                                                /* # components in pixel*/
  4222.                          integer;                                                /* # bits per field     */
  4223.                          unsigned longint;                                       /* Offset to next plane */
  4224.                          unsigned longint;                                       /* Offset to color table*/
  4225.                          fill long;                                              /* Reserved             */
  4226.                          /* Color Table */
  4227.                          unsigned hex longint;                                   /* ctSeed               */
  4228.                          integer;                                                /* ctFlags              */
  4229.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4230.                          wide array ColorSpec {
  4231.                                  integer;                                        /* value                */
  4232.                                  unsigned integer;                               /* RGB: red             */
  4233.                                  unsigned integer;                               /*      green           */
  4234.                                  unsigned integer;                               /*      blue            */
  4235.                          };
  4236.                          Rect;                       /* srcRect */
  4237.                          Rect;                       /* destRect */
  4238.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4239.                                      notSrcCopy, notSrcOr, notSrcXor,
  4240.                                      notSrcBic, patCopy, patOr, patXor,
  4241.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4242.                                      blend = 32, addPin, addOver, subPin,
  4243.                                      adMax = 37, subOver, adMin;
  4244.  packBitsRgnStart2:      integer = (packBitsRgnEnd2[$$ArrayIndex(OpCodes)] - packBitsRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4245.                          Rect;               /* region's enclosing rect */
  4246.                          hex string [$$Word(packBitsRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4247.  packBitsRgnEnd2:        hex string [$$PackedSize(packBitsRgnEnd2[$$ArrayIndex(OpCodes)],
  4248.                                      $$BitField(PackBitsRgnpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  4249.                                      ($$BitField(PackBitsRgnBounds2[$$ArrayIndex(OpCodes)],32,16)
  4250.                                      - $$BitField(PackBitsRgnBounds2[$$ArrayIndex(OpCodes)],0,16)))];
  4251.  
  4252.                      case AppleReserved009A:
  4253.                          key integer = $009A;
  4254.  AppleReserved009AStart: unsigned integer = (AppleReserved009AEnd[$$ArrayIndex(OpCodes)] - AppleReserved009AStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4255.                          hex string [$$Word(AppleReserved009AStart[$$ArrayIndex(OpCodes)])];
  4256.  AppleReserved009AEnd:
  4257.                      case AppleReserved009B:
  4258.                          key integer = $009B;
  4259.  AppleReserved009BStart: unsigned integer = (AppleReserved009BEnd[$$ArrayIndex(OpCodes)] - AppleReserved009BStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4260.                          hex string [$$Word(AppleReserved009BStart[$$ArrayIndex(OpCodes)])];
  4261.  AppleReserved009BEnd:
  4262.                      case AppleReserved009C:
  4263.                          key integer = $009C;
  4264.  AppleReserved009CStart: unsigned integer = (AppleReserved009CEnd[$$ArrayIndex(OpCodes)] - AppleReserved009CStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4265.                          hex string [$$Word(AppleReserved009CStart[$$ArrayIndex(OpCodes)])];
  4266.  AppleReserved009CEnd:
  4267.                      case AppleReserved009D:
  4268.                          key integer = $009D;
  4269.  AppleReserved009DStart: unsigned integer = (AppleReserved009DEnd[$$ArrayIndex(OpCodes)] - AppleReserved009DStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4270.                          hex string [$$Word(AppleReserved009DStart[$$ArrayIndex(OpCodes)])];
  4271.  AppleReserved009DEnd:
  4272.                      case AppleReserved009E:
  4273.                          key integer = $009E;
  4274.  AppleReserved009EStart: unsigned integer = (AppleReserved009EEnd[$$ArrayIndex(OpCodes)] - AppleReserved009EStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4275.                          hex string [$$Word(AppleReserved009EStart[$$ArrayIndex(OpCodes)])];
  4276.  AppleReserved009EEnd:
  4277.                      case AppleReserved009F:
  4278.                          key integer = $009F;
  4279.  AppleReserved009FStart: unsigned integer = (AppleReserved009FEnd[$$ArrayIndex(OpCodes)] - AppleReserved009FStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4280.                          hex string [$$Word(AppleReserved009FStart[$$ArrayIndex(OpCodes)])];
  4281.  AppleReserved009FEnd:
  4282.                      case ShortComment:
  4283.                          key integer = $00A0;
  4284.                          integer;                            /* comment kind */
  4285.                      
  4286.                      case LongComment:
  4287.                          key integer = $00A1;
  4288.                          integer;                            /* comment kind */
  4289.  longCommentStart2:      integer = (longCommentEnd2[$$ArrayIndex(OpCodes)] - longCommentStart2[$$ArrayIndex(OpCodes)] - 16) >> 3;
  4290.                          hex string [$$Word(longCommentStart2[$$ArrayIndex(OpCodes)])];
  4291.  longCommentEnd2:
  4292.                      case OpEndPic:
  4293.                          key integer = $00FF;
  4294.                      
  4295.                      case HeaderOp:
  4296.                          key integer = $0C00;
  4297.                          longint     Version2 = -1;
  4298.                          /* Fixed point bounding box */
  4299.                          unsigned hex longint;
  4300.                          unsigned hex longint;
  4301.                          unsigned hex longint;
  4302.                          unsigned hex longint;
  4303.                          longint     Version2 = -1;      /* Reserved */
  4304.                      
  4305.                  };
  4306.                  align word;
  4307.              };
  4308.      };
  4309.  endOfPict:
  4310. };
  4311.  
  4312. æKY DRVW
  4313. æC  /*
  4314.  * Macintosh Programmer's Workshop
  4315.  * DRVR resource type 'DRVR' (requires DRVRRuntime.o)
  4316.  */
  4317.  
  4318. # define mDownMask      2        /* Event mask values for drvrEMask */
  4319. # define mUpMask        4
  4320. # define keyDownMask    8
  4321. # define keyUpMask     16
  4322. # define autoKeyMask   32
  4323. # define updateMask    64
  4324. # define diskMask     128
  4325. # define activMask    256
  4326. # define networkMask 1024
  4327. # define driverMask  2048
  4328. # define everyEvent    -1
  4329.  
  4330. /*
  4331.  * When building a DRVR resource, insert the line:
  4332.  *
  4333.  *       type 'DRVR' as 'DRVW';
  4334.  *
  4335.  * in your resource file before your "resource 'DRVR' ..." declaration.
  4336.  */
  4337.  
  4338. type 'DRVW' {
  4339.  boolean = 0;                            /* unused */
  4340.  boolean dontNeedLock,    needLock;      /* lock drvr in memory  */
  4341.  boolean dontNeedTime,    needTime;      /* for periodic action  */
  4342.  boolean dontNeedGoodbye, needGoodbye;   /* call before heap reinit*/
  4343.  boolean noStatusEnable,  statusEnable;  /* responds to status   */
  4344.  boolean noCtlEnable,     ctlEnable;     /* responds to control  */
  4345.  boolean noWriteEnable,   writeEnable;   /* responds to write    */
  4346.  boolean noReadEnable,    readEnable;    /* responds to read     */
  4347.  
  4348.  byte = 0;                   /* low byte of drvrFlags word unused */
  4349.  
  4350.  unsigned integer;           /* driver delay (ticks) */
  4351.  integer;                    /* desk acc event mask  */
  4352.  integer;                    /* driver menu ID       */
  4353.  
  4354.  unsigned integer = 50;      /* offset to DRVRRuntime open   */
  4355.  unsigned integer = 54;      /* offset to DRVRRuntime prime  */
  4356.  unsigned integer = 58;      /* offset to DRVRRuntime control*/
  4357.  unsigned integer = 62;      /* offset to DRVRRuntime status */
  4358.  unsigned integer = 66;      /* offset to DRVRRuntime close  */
  4359.  
  4360.  pstring[31];                /* driver name */
  4361.  
  4362.  hex string;                 /* driver code (use $$resource(...)) */
  4363. };
  4364. æKY cmdo
  4365. æC  
  4366. type 'cmdo' {
  4367.   integer = CMDOVersion;                                 /* Version number */
  4368.   integer = $$CountOf(dialogs);                              /* # of dialogs, at least 1 */
  4369.   array dialogs {
  4370.  integer;                                                /* height of the dialog */
  4371.  cstring;                                                /* text displayed in help window */
  4372.  align word;
  4373.  
  4374.  integer = $$CountOf(itemArray);                         /* # of items */
  4375.  
  4376.  /* The order in which Commando writes out the options is the same order in which the
  4377.     items in this array are entered in your resource declaration.  This is important
  4378.     for those commands which have position dependent parameters. */
  4379.     
  4380.  wide array itemArray {
  4381.      switch {
  4382.          case NotDependent:
  4383.              key int = 0;
  4384.          
  4385.          case Or:
  4386.              key byte = 1;
  4387.              byte = $$CountOf(OrArray);
  4388.              wide array OrArray {
  4389.                  int;                                    /* item number dependent upon */
  4390.              };
  4391.          
  4392.          case And:
  4393.              key byte = 2;
  4394.              byte = $$CountOf(AndArray);
  4395.              wide array AndArray {
  4396.                  int;                                    /* item number dependent upon */
  4397.              };
  4398.      };
  4399.      switch {
  4400.          case Files:
  4401.              key byte = FilesID;
  4402.              byte    InputFile,                          /* These types require the  */
  4403.                      InputFileOrDir,                     /* 'Additional' case below. */
  4404.                      InputOrOutputFile,
  4405.                      InputOrOutputOrDir,
  4406.                      
  4407.                      OutputFile,                         /* These types require the  */
  4408.                      OutputFileOrDir,                    /* 'NoMore' case below.     */
  4409.                      DirOnly;
  4410.              switch {
  4411.                  case OptionalFile:
  4412.                      /* Using this case makes a popup with two or three items.
  4413.                         This first item is used to select a default file or to
  4414.                         select no file.  The second (and third) item(s) are used
  4415.                         to select input or output files. */
  4416.                      key int = 0;
  4417.                      rect;                               /* bounds of title */
  4418.                      rect;                               /* bounds of display box */
  4419.                      cstring;                            /* title */
  4420.                      cstring;                            /* default file */
  4421.                      cstring;                            /* option to return before file */
  4422.                      cstring;                            /* If this item is dependent upon
  4423.                                                             another Files item, an extension
  4424.                                                             can be specified here to be added
  4425.                                                             to the dependents file. */
  4426.                      cstring;                            /* help text for popup */
  4427.                      byte        dim, dontDim;           /* Normally, dependent items are
  4428.                                                             dimmed if the parent is disabled,
  4429.                                                             if this field is "dontDim", then
  4430.                                                             this item won't be dimmed */
  4431.                      /* These next three strings are the strings displayed in the popup.  Most
  4432.                         of the file types have only two strings but InputOrOutputFile and 
  4433.                         InputOrOutputOrDir require three strings.  If a string is set to "",
  4434.                         Commando will use a built-in default. */
  4435.                      cstring;                            /* popup item #1 */
  4436.                      cstring;                            /* popup item #2 */
  4437.                      cstring;                            /* popup item #3 */
  4438.              
  4439.                  case RequiredFile:
  4440.                      /* Using this case makes a button that goes directly to standard
  4441.                         file.  Use this case when a file is required and the user doesn't
  4442.                         have the choice of a default file or no file. */
  4443.                      key int = 1;
  4444.                      rect;                               /* bounds of button */
  4445.                      cstring;                            /* title of button */
  4446.                      cstring;                            /* option to return before file */
  4447.                      cstring;                            /* help text for button */
  4448.              };
  4449.              
  4450.              /* Some file types take additional information.  See the comment next to the
  4451.                 file types to find out which case to choose here. */
  4452.              switch {
  4453.                  case Additional:
  4454.                      key byte = 0;
  4455.                      cstring;                                    /* For InputOrOutputFile, an option
  4456.                                                                     can be specified when a new
  4457.                                                                     (or output) file is chosen. */
  4458.                      cstring FilterTypes = ":";                  /* preferred file extension (i.e. ".c") 
  4459.                                                                     If null, no radio buttons will be
  4460.                                                                     displayed.  If FilterTypes is used,
  4461.                                                                     the radio buttons will toggle
  4462.                                                                     between showing files only with
  4463.                                                                     the types below and all files */
  4464.                      cstring;                                    /* title of only files button */
  4465.                      cstring;                                    /* title of all files button */
  4466.                      byte = $$CountOf(TypesArray);               /* up to 4 types may be specified */
  4467.                      align word;
  4468.                      array TypesArray {
  4469.                          literal longint     text = 'TEXT',      /* desired input file type, specify */
  4470.                                              obj  = 'OBJ ',      /* no type for all types */
  4471.                                              appl = 'APPL',
  4472.                                              da   = 'DFIL',
  4473.                                              tool = 'MPST';
  4474.                      };
  4475.  
  4476.                  case NoMore:
  4477.                      key byte = 1;
  4478.              };
  4479.  
  4480.          case MultiFiles:
  4481.              key byte = MultiFilesID;
  4482.              cstring;                                    /* button title */
  4483.              cstring;                                    /* help text for button */
  4484.              align word;
  4485.              rect;                                       /* bounds of button */
  4486.              cstring;                                    /* message like " Source files to compile: " */
  4487.              cstring;                                    /* option returned before each 
  4488.                                                             filename. Can be null */
  4489.              switch {
  4490.                  case MultiInputFiles:
  4491.                      key byte = 0;
  4492.                      byte = $$CountOf(MultiTypesArray);          /* up to 4 types may be specified */
  4493.                      align word;
  4494.                      array MultiTypesArray {
  4495.                          literal longint     text = 'TEXT',      /* desired input file type, specify no type */
  4496.                                              obj  = 'OBJ ',      /* for all types */
  4497.                                              appl = 'APPL',
  4498.                                              da   = 'DFIL',
  4499.                                              tool = 'MPST';
  4500.                      };
  4501.                      cstring FilterTypes = ":";                  /* preferred file extension (i.e. ".c") 
  4502.                                                                     If null, no radio buttons will be
  4503.                                                                     displayed.  If FilterTypes is used,
  4504.                                                                     the radio buttons will toggle
  4505.                                                                     between showing files only with
  4506.                                                                     the types below and all files */
  4507.                      cstring;                                    /* title of only files button */
  4508.                      cstring;                                    /* title of all files button */
  4509.          
  4510.                  case MultiDirs:
  4511.                      key byte = 1;
  4512.  
  4513.                  case MultiInputFilesAndDirs:
  4514.                      key byte = 2;
  4515.  
  4516.                  case MultiOutputFiles:
  4517.                      key byte = 3;
  4518.              };
  4519.  
  4520.          case CheckOption:
  4521.              key byte = CheckOptionID;
  4522.              byte    NotSet, Set;                        /* whether button is set or not */
  4523.              rect;                                       /* bounds */
  4524.              cstring;                                    /* title */
  4525.              cstring;                                    /* option returned */
  4526.              cstring;                                    /* help text for button */
  4527.          
  4528.          case RadioButtons:
  4529.              key byte = RadioButtonsID;
  4530.              byte = $$CountOf(radioArray);               /* # of buttons */
  4531.              wide array radioArray {
  4532.                  rect;                                   /* bounds */
  4533.                  cstring;                                /* title */
  4534.                  cstring;                                /* option returned */
  4535.                  byte    NotSet, Set;                    /* whether button is set or not */
  4536.                  cstring;                                /* help text for button */
  4537.                  align word;
  4538.              };
  4539.          
  4540.          case RegularEntry:
  4541.              key byte = RegularEntryID;
  4542.              cstring;                                    /* title */
  4543.              align word;
  4544.              rect;                                       /* bounds of title */
  4545.              rect;                                       /* bounds of input box */
  4546.              cstring;                                    /* default value */
  4547.              byte        ignoreCase, keepCase;           /* the default value is never displayed
  4548.                                                             in the commando window.  If what the
  4549.                                                             user types in the textedit window
  4550.                                                             matches the default value, then that
  4551.                                                             value isn't displayed.  This flag
  4552.                                                             tells Commando whether to ignore case
  4553.                                                             when comparing the contents of the textedit
  4554.                                                             window with the default value. */
  4555.              cstring;                                    /* option returned */
  4556.              cstring;                                    /* help text for entry */
  4557.  
  4558.          case MultiRegularEntry: /* For scrollable, lists of an option */
  4559.              key byte = MultiRegularEntryID;
  4560.              cstring;                                    /* title */
  4561.              align word;
  4562.              rect;                                       /* bounds of title */
  4563.              rect;                                       /* bounds of input list */
  4564.              byte = $$CountOf(DefEntryList);
  4565.              array DefEntryList {
  4566.                  cstring;                                /* default values */
  4567.              };
  4568.              cstring;                                    /* option returned. Each value
  4569.                                                             will be preceded with this
  4570.                                                             option */
  4571.              cstring;                                    /* help text for entry */
  4572.  
  4573.          case Box:       /* Can be used to draw lines too */
  4574.              key byte = BoxID;
  4575.              byte            black, gray;                /* color of object */
  4576.              rect;                                       /* bounds of box or line */
  4577.              
  4578.          case TextBox:   /* Draws a box with title in upper-left */
  4579.              key byte = TextBoxID;
  4580.              byte            black, gray;                /* color of object */
  4581.              rect;                                       /* bounds of box or line */
  4582.              cstring;                                    /* title */
  4583.              
  4584.          case TextTitle:
  4585.              key byte = TextTitleID;
  4586.              byte        plain;                          /* style of text */         
  4587.              rect;                                       /* bounds of title */
  4588.              int         systemFont;                     /* font number to use */
  4589.              int         systemSize;                     /* font size to use */
  4590.              cstring;                                    /* the text to display */
  4591.          
  4592.          case PopUp:
  4593.              key byte = PopUpID;
  4594.              byte        Window, Alias, Font, Set;       /* popup type */
  4595.              rect;                                       /* bounds of title */
  4596.              rect;                                       /* bounds of popup line */
  4597.              cstring;                                    /* title */
  4598.              cstring;                                    /* option returned */
  4599.              cstring;                                    /* help text for popup */
  4600.              byte        noDefault, hasDefault;          /* hasDefault if first item is "Default Value" */
  4601.  
  4602.          case EditPopUp:
  4603.              key byte = EditPopUpID;
  4604.              /* For MenuItem, this EditPopUp must be dependent upon another EditPopUp
  4605.                 of the MenuTitle type so that the control knows whose menu items to
  4606.                 display.
  4607.                 
  4608.                 For FontSize, this EditPopUp must be dependent upon a PopUp of the
  4609.                 Font type so that the control knows what sizes of the font exist. */
  4610.                 
  4611.              byte    MenuTitle, MenuItem,                /* Type of editable pop-up */
  4612.                      FontSize, Alias, Set;
  4613.              rect;                                       /* bounds of title */
  4614.              rect;                                       /* bounds of text edit area */
  4615.              cstring;                                    /* title */
  4616.              cstring;                                    /* option to return */
  4617.              cstring;                                    /* help text for textedit part */
  4618.              cstring;                                    /* help text for popup part */
  4619.              
  4620.          case NestedDialog:
  4621.              key byte = NestedDialogID;
  4622.              byte;                                       /* the number of the dialog
  4623.                                                             to call.  It must be greater
  4624.                                                             than the current dialog */
  4625.              rect;                                       /* bounds of button */
  4626.              cstring;                                    /* button's title */
  4627.              cstring;                                    /* help text for button */
  4628.          
  4629.          case Redirection:
  4630.              key byte = RedirectionID;
  4631.              byte    StandardOutput, DiagnosticOutput,   /* the type of redirection */
  4632.                      StandardInput;
  4633.              point;                                      /* upper-left point of the whole contraption */
  4634.  
  4635.          case TriStateButtons:
  4636.              key byte = TriStateButtonsID;
  4637.              byte = $$CountOf(threeStateArray);          /* # of buttons */
  4638.              cstring;                                    /* option returned */
  4639.              wide array threeStateArray {
  4640.                  align word;
  4641.                  rect;                                   /* bounds */
  4642.                  cstring;                                /* title */
  4643.                  cstring;                                /* string for Clear state */
  4644.                  cstring;                                /* string for DontTouch state */
  4645.                  cstring;                                /* string for Set state */
  4646.                  cstring;                                /* help text for button */
  4647.              };
  4648.  
  4649.          case List:      /* Puts up a list of "things" and allows multiple selections */
  4650.              key byte = ListID;
  4651.              byte        Volumes, ShellVars,
  4652.                          Windows, Aliases;               /* what to display in the list */
  4653.              cstring;                                    /* option to return before each "thing" */
  4654.              cstring;                                    /* title */
  4655.              align word;
  4656.              rect;                                       /* bounds of title */
  4657.              rect;                                       /* bounds of list selection box */
  4658.              cstring;                                    /* help text for selection box */
  4659.  
  4660.          case PictOrIcon:
  4661.              key byte = PictOrIconID;
  4662.              byte    Icon, Picture;                      /* display a picture or icon */
  4663.              int;                                        /* resource id of icon/picture */
  4664.              rect;                                       /* display bounds */
  4665.  
  4666.          case Dummy:
  4667.              key byte = DummyID;
  4668.  
  4669.          case DoItButton:                                /* Allows the 'do it' button to be dependent */
  4670.              key byte = DoItButtonID;
  4671.  
  4672.          case VersionDialog:                             /* Display a dialog when the version # is clicked */
  4673.              key byte = VersionDialogID;
  4674.              switch {
  4675.                  case VersionString:                     /* Version string embedded right here */
  4676.                      key byte = 0;
  4677.                      cstring;                            /* Version string of tool (e.g. V2.0) */
  4678.                  
  4679.                  case VersionResource:                   /* Versions string comes from another resource */
  4680.                      key byte = 1;
  4681.                      literal longint;                    /* resource type of pascal string containing version string */
  4682.                      integer;                            /* resource id of version string */
  4683.              };
  4684.              cstring;                                    /* Version text for help window */
  4685.              align word;
  4686.              integer     noDialog;                       /* Rsrc id of 'DLOG' */
  4687.                  /* NOTE •1: if there is no modal dialog to display when the version
  4688.                     string is clicked, set the rsrc id to zero (noDialog).
  4689.  
  4690.                     NOTE •2: if the version string comes from another resource (VersionResource),
  4691.                     the string must be the first thing in the resource and the string must be 
  4692.                     a pascal-style string.  A 'STR ' resource is an example of a resource that
  4693.                     fits the bill.
  4694.                     
  4695.                     NOTE •3: if the modal dialog is to have a filter proc, the proc
  4696.                     must be linked as a 'fltr' resource with the same resource id
  4697.                     as the dialog. */
  4698.      };
  4699.      align word;
  4700.  };
  4701.  align word;
  4702.   };
  4703. };
  4704.  
  4705. æKY mxwt
  4706. æC  /*
  4707.   'mxwt' is a new resource type for templates. The only difference is a word count for the
  4708.    number of fields in a type. 'mxbt' used a byte count. 'mxbt' is still supported.
  4709.    However, you need the word count if you want to use ResEdit to create templates.
  4710. */
  4711.  
  4712. type 'mxwt'{
  4713.  integer = $$CountOf(templates);                 /* Number of templates               */
  4714.  array templates { pString;                      /* Type name                         */
  4715.                    integer = $$CountOf(fields);  /* Number of fields in this template */
  4716.                    array fields { pString;       /* Field name                        */
  4717.                                   pString;       /* Field type                        */
  4718.                                   integer;       /* Number of fields of this type     */
  4719.                                 };
  4720.                  };
  4721. };
  4722.  
  4723. resource 'mxwt' (100) {
  4724.  {
  4725.  
  4726.  /* Sample shows all possible types:
  4727.  "Sample", {
  4728.      "Byte",             "Byte",             1,
  4729.      "Signed Byte",      "SignedByte",       1,
  4730.      "Unsigned Byte",    "UnsignedByte",     1,
  4731.      "Align to word",    "Align",            1,
  4732.      "Word",             "Word",             1,
  4733.      "Signed Word",      "SignedWord",       1,
  4734.      "Unsigned Word",    "UnsignedWord",     1,
  4735.      "Long",             "Long",             1,
  4736.      "Signed Long",      "SignedLong",       1,
  4737.      "Unsigned Long",    "UnsignedLong",     1,
  4738.      "Boolean",          "Boolean",          1,
  4739.      "Padding",          "Skip",             1,
  4740.      "Pascal string",    "pString",          10,
  4741.      "C string",         "cString",          1,
  4742.      "Align to word",    "Align",            1,
  4743.      "Text",             "Text",             4,
  4744.      "Handle",           "Handle",           1,
  4745.      "Next",             "^Sample",          1
  4746.      },
  4747.  */
  4748.  
  4749.  "BitMap", {
  4750.      "baseAddr",         "Long",             1,
  4751.      "rowBytes",         "Word",             1,
  4752.      "bounds",           "Word",             4
  4753.      },
  4754.  
  4755.  "GrafPort", {
  4756.      "device",           "word",             1,
  4757.      "portBits",         "BitMap",           1,
  4758.      "portRect",         "Word",             4,
  4759.      "visRgn",           "Handle",           1,
  4760.      "clipRgn",          "Handle",           1,
  4761.      "bkPat",            "Byte",             8,
  4762.      "fillPat",          "Byte",             8,
  4763.      "pnLoc",            "Word",             2,
  4764.      "pnSize",           "Word",             2,
  4765.      "pnMode",           "Word",             1,
  4766.      "pnPat",            "Byte",             8,
  4767.      "pnVis",            "Word",             1,
  4768.      "txFont",           "Word",             1,
  4769.      "txFace",           "Word",             1,
  4770.      "txMode",           "Word",             1,
  4771.      "txSize",           "Word",             1,
  4772.      "",                 "Skip",             4,
  4773.      "fgColor",          "Long",             1,
  4774.      "bkColor",          "Long",             1,
  4775.      "colrBit",          "Word",             1,
  4776.      "patStretch",       "Word",             1,
  4777.      "picSave",          "Handle",           1,
  4778.      "rgnSave",          "Handle",           1,
  4779.      "polySave",         "Handle",           1,
  4780.      "grafProcs",        "Long",             1
  4781.      },
  4782.  
  4783.  "WindowRecord", {
  4784.      "",                 "Skip",             16,
  4785.      "portRect",         "Word",             4,
  4786.      "visRgn",           "Handle",           1,
  4787.      "clipRgn",          "Handle",           1,
  4788.      "",                 "Skip",             76,
  4789.      "windowKind",       "Word",             1,
  4790.      "visible",          "Boolean",          1,
  4791.      "hilited",          "Boolean",          1,
  4792.      "goAwayFlag",       "Boolean",          1,
  4793.      "spareFlag",        "Boolean",          1,
  4794.      "strucRgn",         "Handle",           1,
  4795.      "contRgn",          "Handle",           1,
  4796.      "updateRgn",        "Handle",           1,
  4797.      "windowDefProc",    "Handle",           1,
  4798.      "dataHandle",       "Handle",           1,
  4799.      "titleHandle",      "^^PString",        1,
  4800.      "titleWidth",       "Word",             1,
  4801.      "controlList",      "Handle",           1,
  4802.      "nextWindow",       "^WindowRecord",    1,
  4803.      "windowPic",        "Handle",           1,
  4804.      "refCon",           "Long",             1
  4805.      },
  4806.  
  4807.  "TERec", {
  4808.      "destRect",         "Word",             4,
  4809.      "viewRect",         "Word",             4,
  4810.      "selRect",          "Word",             4,
  4811.      "lineHeight",       "Word",             1,
  4812.      "fontAscent",       "Word",             1,
  4813.      "selPoint",         "Word",             2,
  4814.      "selStart",         "Word",             1,
  4815.      "selEnd",           "Word",             1,
  4816.      "active",           "Word",             1,
  4817.      "wordBreak",        "Long",             1,
  4818.      "clikLoop",         "Long",             1,
  4819.      "clickTime",        "Long",             1,
  4820.      "clickLoc",         "Word",             1,
  4821.      "caretTime",        "Long",             1,
  4822.      "caretState",       "Word",             1,
  4823.      "just",             "Word",             1,
  4824.      "teLength",         "Word",             1,
  4825.      "hText",            "Handle",           1,
  4826.      "recalBack",        "Word",             1,
  4827.      "recalLines",       "Word",             1,
  4828.      "clikStuff",        "Word",             1,
  4829.      "crOnly",           "Word",             1,
  4830.      "txFont",           "Word",             1,
  4831.      "txFace",           "Byte",             1,
  4832.      "",                 "Align",            1;
  4833.      "txMode",           "Word",             1,
  4834.      "txSize",           "Word",             1,
  4835.      "inPort",           "^GrafPort",        1,
  4836.      "highHook",         "Long",             1,
  4837.      "caretHook",        "Long",             1,
  4838.      "nLines",           "Word",             1,
  4839.      "lineStarts",       "Word",             20  /* Actually, there can be 16001 of these */
  4840.      },
  4841.  
  4842.  "IOPB", {
  4843.      "qLink",            "Long",             1,
  4844.      "qType",            "Word",             1,
  4845.      "ioTrap",           "Word",             1,
  4846.      "ioCmdAddr",        "Long",             1,
  4847.      "ioCompletion",     "Long",             1,
  4848.      "ioResult",         "Word",             1,
  4849.      "ioNamePtr",        "^PString",         1,
  4850.      "ioVRefNum",        "Word",             1,
  4851.      "ioRefNum",         "Word",             1,
  4852.      "ioVersNum",        "SignedByte",       1,
  4853.      "ioPermssn",        "SignedByte",       1,
  4854.      "ioMisc",           "Long",             1,
  4855.      "ioBuffer",         "Long",             1,
  4856.      "ioReqCount",       "Long",             1,
  4857.      "ioActCount",       "Long",             1,
  4858.      "ioPosMode",        "Word",             1,
  4859.      "ioPosOffset",      "Long",             1
  4860.      },
  4861.  
  4862.  "Zone", {
  4863.      "bkLim",            "Long",             1,
  4864.      "purgePtr",         "Long",             1,
  4865.      "hFstFree",         "Long",             1,
  4866.      "zcbFree",          "Long",             1,
  4867.      "gzProc",           "Long",             1,
  4868.      "moreMast",         "Word",             1,
  4869.      "flags",            "Word",             1,
  4870.      "",                 "Skip",             16, /* Unused count fields */
  4871.      "purgeProc",        "Long",             1,
  4872.      "sparePtr",         "Long",             1,
  4873.      "allocPtr",         "Long",             1
  4874.      },
  4875.  
  4876.  "VCB", {
  4877.      "qLink",            "Long",             1,
  4878.      "qType",            "Word",             1,
  4879.      "vcbFlags",         "Word",             1,
  4880.      "vcbSigWord",       "Word",             1,
  4881.      "vcbCrDate",        "Long",             1,
  4882.      "vcbLsBkUp",        "Long",             1,
  4883.      "vcbAtrb",          "Word",             1,
  4884.      "vcbNmFls",         "Word",             1,
  4885.      "vcbDirSt",         "Word",             1,
  4886.      "vcbBlLn",          "Word",             1,
  4887.      "vcbNmBlks",        "Word",             1,
  4888.      "vcbAlBlkSiz",      "Long",             1,
  4889.      "vcbClpSiz",        "Long",             1,
  4890.      "vcbAlBlSt",        "Word",             1,
  4891.      "vcbNxtFNum",       "Long",             1,
  4892.      "vcbFreeBks",       "Word",             1,
  4893.      "vcbVN",            "PString",          27,
  4894.      "",                 "Align",            1,
  4895.      "vcbDrvNum",        "Word",             1,
  4896.      "vcbDRefNum",       "Word",             1,
  4897.      "vcbFSID",          "Word",             1,
  4898.      "vcbVRefNum",       "Word",             1,
  4899.      "vcbMAdr",          "Long",             1,
  4900.      "vcbBufAdr",        "Long",             1,
  4901.      "vcbMLen",          "Word",             1,
  4902.      "vcbDirIndex",      "Word",             1,
  4903.      "vcbDirBlk",        "Word",             1
  4904.      },
  4905.  
  4906.  "ControlRecord", {
  4907.      "nextControl",      "^^ControlRecord",  1,
  4908.      "contrlOwner",      "Long",             1,
  4909.      "contrlRect",       "Word",             4,
  4910.      "contrlVis",        "Byte",             1,
  4911.      "contrlHilite",     "Byte",             1,
  4912.      "contrlValue",      "Word",             1,
  4913.      "contrlMin",        "Word",             1,
  4914.      "contrlMax",        "Word",             1,
  4915.      "contrlDefProc",    "Handle",           1,
  4916.      "contrlData",       "Handle",           1,
  4917.      "contrlAction",     "Long",             1,
  4918.      "contrlRfCon",      "Long",             1,
  4919.      "contrlTitle",      "PString",          0
  4920.      },
  4921.  
  4922.  "DialogRecord", {
  4923.      "window",           "WindowRecord",     1,
  4924.      "items",            "Handle",           1,
  4925.      "textH",            "^^TERec",          1,
  4926.      "editField",        "Word",             1,
  4927.      "editOpen",         "Word",             1,
  4928.      "aDefItem",         "Word",             1
  4929.      },
  4930.  
  4931.  "EventRecord", {
  4932.      "what",             "Word",             1,
  4933.      "message",          "Long",             1,
  4934.      "when",             "Long",             1,
  4935.      "where",            "Word",             2,
  4936.      "modifiers",        "Word",             1
  4937.      },
  4938.  
  4939.  "SFReply", {
  4940.      "good",             "Boolean",          1,
  4941.      "copy",             "Boolean",          1,
  4942.      "fType",            "Text",             4,
  4943.      "vRefNum",          "Word",             1,
  4944.      "version",          "Word",             1,
  4945.      "fName",            "PString",          0
  4946.      },
  4947.  
  4948.  "MenuInfo", {
  4949.      "menuID",           "Word",             1,
  4950.      "menuWidth",        "Word",             1,
  4951.      "menuHeight",       "Word",             1,
  4952.      "menuProc",         "Long",             1,
  4953.      "enableFlags",      "Long",             1,
  4954.      "menuData",         "PString",          0
  4955.      },
  4956.  
  4957.  "FontRec",  {
  4958.      "fontType",         "Word",             1,
  4959.      "firstChar",        "Word",             1,
  4960.      "lastChar",         "Word",             1,
  4961.      "widMax",           "Word",             1,
  4962.      "kernMax",          "SignedWord",       1,
  4963.      "nDescent",         "SignedWord",       1,
  4964.      "fRectWidth",       "Word",             1,
  4965.      "fRectHeight",      "Word",             1,
  4966.      "owTLoc",           "Word",             1,
  4967.      "ascent",           "Word",             1,
  4968.      "descent",          "Word",             1,
  4969.      "leading",          "Word",             1,
  4970.      "rowWords",         "Word",             1,
  4971.      "bitImage",         "Byte",             16,
  4972.      "bitImage",         "Byte",             16,
  4973.      "bitImage",         "Byte",             16,
  4974.      "bitImage",         "Byte",             16
  4975.      },
  4976.  
  4977.   "ListRec", {
  4978.      "rview",            "Word",             4,
  4979.      "portPtr",          "Long",             1,
  4980.      "indent",           "Word",             2,
  4981.      "cellSize",         "Word",             2,
  4982.      "visible",          "Word",             4,
  4983.      "vScroll",          "Handle",           1,
  4984.      "hScroll",          "Handle",           1,
  4985.      "selFlags",         "Byte",             1,
  4986.      "lActive",          "Boolean",          1,
  4987.      "lReserved",        "Byte",             1,
  4988.      "listFlags",        "Byte",             1,
  4989.      "clikTime",         "Long",             1,
  4990.      "clikLoc",          "Word",             2,
  4991.      "mouseLoc",         "Word",             2,
  4992.      "lClikLoop",        "Long",             1,
  4993.      "lastClick",        "Word",             2,
  4994.      "refCon",           "Long",             1,
  4995.      "listDefProc",      "Handle",           1,
  4996.      "userHandle",       "Handle",           1,
  4997.      "dataBounds",       "Word",             4,
  4998.      "cells",            "Handle",           1,
  4999.      "maxIndex",         "Word",             1,
  5000.      "cellArray",        "Word",             16
  5001.      },
  5002.  
  5003.   /* "DM A6+14 Stack" will display the parameters and locals on the stack */
  5004.   "Stack", {
  5005.      "Param 1",          "Long",             1,
  5006.      "Param 2",          "Long",             1,
  5007.      "Param 3",          "Long",             1,
  5008.      "Param 4",          "Long",             1,
  5009.      "",                 "Skip",             8,  /* Skip return address and A6 */
  5010.      "Local 1",          "Long",             1,
  5011.      "Local 2",          "Long",             1,
  5012.      "Local 3",          "Long",             1,
  5013.      "Local 4",          "Long",             1
  5014.      },
  5015.  },
  5016. };
  5017.  
  5018. æKY mxbm 
  5019. æC  type 'mxbm'{
  5020.  integer = $$CountOf(symbols);          /* Number of entries     */
  5021.  array symbols { pString; pString; };   /* Macro name; expansion */
  5022. };
  5023.  
  5024. resource 'mxbm' (100) {
  5025.     {   /* Useful command lines */
  5026.  
  5027.  /* Clear breakpoints, A-Trap breaks and then go */
  5028.  "GG",           "BRC;ATC;G",
  5029.  
  5030.  /* Break at the first instruction of a segment after loading it */
  5031.  "GS",           "SB 12D 1;G;T 2;SB 12D 0",
  5032.  
  5033.  /* Pop the return address of the stack and go to it */
  5034.  "RTS",          "PC = SP^;SP = SP + 4",
  5035.  
  5036.           /* Enter "GTO n" to go till offset n in the current procedure is reached */
  5037.      "GTO",          "GT :+",
  5038.  
  5039.           /* Enter "BRO n" to set a breakpoint at offset n in the current procedure */
  5040.      "BRO",          "BR :+",
  5041.  
  5042.  /* Displays the port assuming the A5 world is set up */
  5043.      "thePort",      "DM A5^^ WindowRecord",
  5044.  
  5045.           /* IJ disassembles starting from the destination of a JMP instruction */
  5046.      "IJ",           "IL (.+2)^",
  5047.  
  5048.  
  5049.  "ABusVars",         "02D8",
  5050.  "ACount",           "0A9A",
  5051.  "ADBBase",          "0CF8",
  5052.  "AGBHandle",        "0D1C",
  5053.  "AlarmState",       "021F",
  5054.  "ANumber",          "0A98",
  5055.  "ApFontID",         "0984",
  5056.  "App2Packs",        "0BC8",
  5057.  "ApplLimit",        "0130",
  5058.  "ApplScratch",      "0A78",
  5059.  "ApplZone",         "02AA",
  5060.  "AppPacks",         "0AB8",
  5061.  "AppParmHandle",    "0AEC",
  5062.  "ASCBase",          "0CC0",
  5063.  "AtalkHk1",         "0B14",
  5064.  "AtalkHk2",         "0B18",
  5065.  "AtMenuBottom",     "0A0C",
  5066.  "AuxCtlHead",       "0CD4",
  5067.  "AuxWinHead",       "0CD0",
  5068.  
  5069.  "BNMQHd",           "0B60",
  5070.  "BootDrive",        "0210",
  5071.  "BootMask",         "0B0E",
  5072.  "BootTmp8",         "0B36",
  5073.  "BtDskRfn",         "0B34",
  5074.  "BufPtr",           "010C",
  5075.  "BufTgDate",        "0304",
  5076.  "BufTgFBkNum",      "0302",
  5077.  "BufTgFFlg",        "0300",
  5078.  "BufTgFNum",        "02FC",
  5079.  
  5080.  "CaretTime",        "02F4",
  5081.  "ChooserBits",      "0946",
  5082.  "ChunkyDepth",      "0D60",
  5083.  "CkdDB",            "0340",
  5084.  "CloseOrnHook",     "0A88",
  5085.  "ColLines",         "0C22",
  5086.  "CoreEditVars",     "0954",
  5087.  "CPUFlag",          "012F",
  5088.  "CQDGlobals",       "0CCC",
  5089.  "CrsrAddr",         "0888",
  5090.  "CrsrBase",         "0898",
  5091.  "CrsrBusy",         "08CD",
  5092.  "CrsrCouple",       "08CF",
  5093.  "CrsrDevice",       "089C",
  5094.  "CrsrNew",          "08CE",
  5095.  "CrsrObscure",      "08D2",
  5096.  "CrsrPin",          "0834",
  5097.  "CrsrPtr",          "0D62",
  5098.  "CrsrRect",         "083C",
  5099.  "CrsrRow",          "08AC",
  5100.  "CrsrSave",         "088C",
  5101.  "CrsrScale",        "08D3",
  5102.  "CrsrState",        "08D0",
  5103.  "CrsrThresh",       "08EC",
  5104.  "CrsrVis",          "08CC",
  5105.  "CurActivate",      "0A64",
  5106.  "CurApName",        "0910",
  5107.  "CurApRefNum",      "0900",
  5108.  "CurDeactive",      "0A68",
  5109.  "CurDeKind",        "0A22",
  5110.  "CurDirStore",      "0398",
  5111.  "CurDragAction",    "0A46",
  5112.  "CurFMDenom",       "0994",
  5113.  "CurFMDevice",      "098E",
  5114.  "CurFMFace",        "098C",
  5115.  "CurFMFamily",      "0988",
  5116.  "CurFMInput",       "0988",
  5117.  "CurFMNeedBits",    "098D",
  5118.  "CurFMNumer",       "0990",
  5119.  "CurFMSize",        "098A",
  5120.  "CurJTOffset",      "0934",
  5121.  "CurMap",           "0A5A",
  5122.  "CurPageOption",    "0936",
  5123.  "CurPitch",         "0280",
  5124.  "CurrentA5",        "0904",
  5125.  "CurStackBase",     "0908",
  5126.  
  5127.  "DABeeper",         "0A9C",
  5128.  "DAStrings",        "0AA0",
  5129.  "DefltStack",       "0322",
  5130.  "DefVCBPtr",        "0352",
  5131.  "DeskCPat",         "0CD8",
  5132.  "DeskHook",         "0A6C",
  5133.  "SetOSDefKey",      "0CDC",
  5134.  "DeskPattern",      "0A3C",
  5135.  "DeskPort",         "09E2",
  5136.  "DeviceList",       "08A8",
  5137.  "DiskVars",         "0222",
  5138.  "DlgFont",          "0AFA",
  5139.  "DoubleTime",       "02F0",
  5140.  "DragFlag",         "0A44",
  5141.  "DragHook",         "09F6",
  5142.  "DragPattern",      "0A34",
  5143.  "DrMstrBlk",        "034C",
  5144.  "DrvQHdr",          "0308",
  5145.  "DSAlertRect",      "03F8",
  5146.  "DSAlertTab",       "02BA",
  5147.  "DSCtrAdj",         "0DA8",
  5148.  "DSDrawProc",       "0334",
  5149.  "DSErrCode",        "0AF0",
  5150.  "DskErr",           "0142",
  5151.  "DskRtnAdr",        "0124",
  5152.  "DskSwtchHook",     "03EA",
  5153.  "DskVerify",        "012C",
  5154.  "DskWr11",          "012F",
  5155.  "DSWndUpdate",      "015D",
  5156.  "DTQFlags",         "0D92",
  5157.  "DTQueue",          "0D92",
  5158.  "DTskQHdr",         "0D94",
  5159.  "DTskQTail",        "0D98",
  5160.  
  5161.  "EjectNotify",      "0338",
  5162.  "EndSRTPtr",        "0DB4",
  5163.  "ErCode",           "03A2",
  5164.  "EventQueue",       "014A",
  5165.  "EvtBufCnt",        "0154",
  5166.  "ExpandMem",        "02B6",
  5167.  "ExtFSHook",        "03E6",
  5168.  "ExtStsDT",         "02BE",
  5169.  
  5170.  "FCBSPtr",          "034E",
  5171.  "FDevDisable",      "0BB3",
  5172.  "FileVars",         "0340",
  5173.  "Filler3A",         "0214",
  5174.  "Finder",           "0261",
  5175.  "FinderName",       "02E0",
  5176.  "FLckUnlck",        "0348",
  5177.  "FlEvtMask",        "025E",
  5178.  "FlushOnly",        "0346",
  5179.  "FMDefaultSize",    "0987",
  5180.  "FMDotsPerInch",    "09B2",
  5181.  "FMExist",          "0D42",
  5182.  "FMgrOutRec",       "0998",
  5183.  "FMStyleTab",       "09B6",
  5184.  "FondID",           "0BC6",
  5185.  "FondState",        "0903",
  5186.  "FontFlag",         "015E",
  5187.  "FOutAscent",       "09A5",
  5188.  "FOutBold",         "099E",
  5189.  "FOutDenom",        "09AE",
  5190.  "FOutDescent",      "09A6",
  5191.  "FOutError",        "0998",
  5192.  "FOutExtra",        "09A4",
  5193.  "FOutFontHandle",   "099A",
  5194.  "FOutItalic",       "099F",
  5195.  "FOutLeading",      "09A8",
  5196.  "FOutNumer",        "09AA",
  5197.  "FOutRec",          "0998",
  5198.  "FOutShadow",       "09A3",
  5199.  "FOutULOffset",     "09A0",
  5200.  "FOutULShadow",     "09A1",
  5201.  "FOutULThick",      "09A2",
  5202.  "FOutUnused",       "09A9",
  5203.  "FOutWidMax",       "09A7",
  5204.  "FPState",          "0A4A",
  5205.  "FractEnable",      "0BF4",
  5206.  "FrcSync",          "0349",
  5207.  "FSBusy",           "0360",
  5208.  "FScaleDisable",    "0A63",
  5209.  "FScaleHFact",      "0BF6",
  5210.  "FScaleVFact",      "0BFA",
  5211.  "FSFCBLen",         "03F6",
  5212.  "FSQHdr",           "0360",
  5213.  "FSQHead",          "0362",
  5214.  "FSQTail",          "0366",
  5215.  "FSQueueHook",      "03E2",
  5216.  "FSTemp4",          "03DE",
  5217.  "FSTemp8",          "03D6",
  5218.  "FSVarEnd",         "03F6",
  5219.  
  5220.  "GetParam",         "01E4",
  5221.  "GhostWindow",      "0A84",
  5222.  "GotStrike",        "0986",
  5223.  "GrafBegin",        "0800",
  5224.  "GrafVar",          "0824",
  5225.  "GrayRgn",          "09EE",
  5226.  "GZMoveHnd",        "0330",
  5227.  "GZRootHnd",        "0328",
  5228.  "GZRootPtr",        "032C",
  5229.  
  5230.  "HeapEnd",          "0114",
  5231.  "HFSFlags",         "0376",
  5232.  "HiHeapMark",       "0BAE",
  5233.  "HiKeyLast",        "0216",
  5234.  "HiliteMode",       "0938",
  5235.  "HiliteRGB",        "0DA0",
  5236.  "HpChk",            "0316",
  5237.  "HWCfgFlags",       "0B22",
  5238.  
  5239.  "IAZNotify",        "033C",
  5240.  "IconBitmap",       "0A0E",
  5241.  "IconTLAddr",       "0DAC",
  5242.  "IntFlag",          "015F",
  5243.  "IntlSpec",         "0BA0",
  5244.  "IWM",              "01E0",
  5245.  
  5246.  "JAdrDisk",         "0252",
  5247.  "JAllocCrsr",       "088C",
  5248.  "JControl",         "0242",
  5249.  "JCrsrObscure",     "081C",
  5250.  "JCrsrTask",        "08EE",
  5251.  "JDCDReset",        "0B48",
  5252.  "JDiskPrime",       "0226",
  5253.  "JDiskSel",         "0B40",
  5254.  "jDTInstall",       "0D9C",
  5255.  "JFetch",           "08F4",
  5256.  "JFigTrkSpd",       "0222",
  5257.  "JFontInfo",        "08E4",
  5258.  "JGNEFilter",       "029A",
  5259.  "JHideCursor",      "0800",
  5260.  "JInitCrsr",        "0814",
  5261.  "JIODone",          "08FC",
  5262.  "JKybdTask",        "021A",
  5263.  "JMakeSpdTbl",      "024E",
  5264.  "JOpcodeProc",      "0894",
  5265.  "JournalFlag",      "08DE",
  5266.  "JournalRef",       "08E8",
  5267.  "JRdAddr",          "022A",
  5268.  "JRdData",          "022E",
  5269.  "JRecal",           "023E",
  5270.  "JReSeek",          "024A",
  5271.  "JScrnAddr",        "080C",
  5272.  "JScrnSize",        "0810",
  5273.  "JSeek",            "0236",
  5274.  "JSendCmd",         "0B44",
  5275.  "JSetCCrsr",        "0890",
  5276.  "JSetCrsr",         "0818",
  5277.  "JSetSpeed",        "0256",
  5278.  "JSetUpPoll",       "023A",
  5279.  "JShell",           "0212",
  5280.  "JShieldCursor",    "0808",
  5281.  "JShowCursor",      "0804",
  5282.  "JStash",           "08F8",
  5283.  "JSwapFont",        "08E0",
  5284.  "jSwapMMU",         "0DBC",
  5285.  "JUpdateProc",      "0820",
  5286.  "JVBLTask",         "0D28",
  5287.  "JWakeUp",          "0246",
  5288.  "JWrData",          "0232",
  5289.  
  5290.  "KbdLast",          "0218",
  5291.  "KbdType",          "021E",
  5292.  "KbdVars",          "0216",
  5293.  "Key1Trans",        "029E",
  5294.  "Key2Trans",        "02A2",
  5295.  "KeyLast",          "0184",
  5296.  "KeyMap",           "0174",
  5297.  "KeyMVars",         "0B04",
  5298.  "KeypadMap",        "017C",
  5299.  "KeyRepThresh",     "0190",
  5300.  "KeyRepTime",       "018A",
  5301.  "KeyThresh",        "018E",
  5302.  "KeyTime",          "0186",
  5303.  
  5304.  "LastDepth",        "0D40",
  5305.  "LastFond",         "0BC2",
  5306.  "LastFore",         "0D36",
  5307.  "LastLGlobal",      "0944",
  5308.  "LastMode",         "0D3E",
  5309.  "LastPGlobal",      "0954",
  5310.  "LastSPExtra",      "0B4C",
  5311.  "LastTGLobal",      "0AFC",
  5312.  "LastTxGDevice",    "0DC4",
  5313.  "LaunchFlag",       "0902",
  5314.  "LGrafJump",        "0824",
  5315.  "LoaderPBlock",     "093A",
  5316.  "LoadFiller",       "090C",
  5317.  "LoadTrap",         "012D",
  5318.  "LoadVars",         "0900",
  5319.  "Lvl1DT",           "0192",
  5320.  "Lvl2DT",           "01B2",
  5321.  
  5322.  "MacJmp",           "0120",
  5323.  "MacPgm",           "0316",
  5324.  "MAErrProc",        "0BE8",
  5325.  "MainDevice",       "08A4",
  5326.  "MaskBC",           "031A",
  5327.  "MaskHandle",       "031A",
  5328.  "MaskPtr",          "031A",
  5329.  "MASuperTab",       "0BEC",
  5330.  "MaxDB",            "0344",
  5331.  "MBarEnable",       "0A20",
  5332.  "MBarHeight",       "0BAA",
  5333.  "MBarHook",         "0A2C",
  5334.  "MBDFHndl",         "0B58",
  5335.  "MBSaveLoc",        "0B5C",
  5336.  "MBState",          "0172",
  5337.  "MBTicks",          "016E",
  5338.  "MemErr",           "0220",
  5339.  "MemTop",           "0108",
  5340.  "MenuCInfo",        "0D50",
  5341.  "MenuDisable",      "0B54",
  5342.  "MenuFlash",        "0A24",
  5343.  "MenuHook",         "0A30",
  5344.  "MenuList",         "0A1C",
  5345.  "MickeyBytes",      "0D6A",
  5346.  "MinStack",         "031E",
  5347.  "MMDefFlags",       "0326",
  5348.  "MmInOK",           "012E",
  5349.  "MMU32bit",         "0CB2",
  5350.  "MMUFlags",         "0CB0",
  5351.  "MMUFluff",         "0CB3",
  5352.  "MMUTbl",           "0CB4",
  5353.  "MMUTblSize",       "0CB8",
  5354.  "MMUType",          "0CB1",
  5355.  "MonkeyLives",      "0100",
  5356.  "Mouse",            "0830",
  5357.  "MouseMask",        "08D6",
  5358.  "MouseOffset",      "08DA",
  5359.  "MrMacHook",        "0A2C",
  5360.  "MTemp",            "0828",
  5361.  
  5362.      };
  5363. };
  5364.  
  5365.  
  5366. resource 'mxbm' (101) {
  5367. {"NewCrsrJTbl",      "088C",
  5368.  "NewMount",         "034A",
  5369.  "NewUnused",        "0BC0",
  5370.  "NiblTbl",          "025A",
  5371.  "NMIFlag",          "0C2C",
  5372.  "NxtDB",            "0342",
  5373.  
  5374.  "OldContent",       "09EA",
  5375.  "OldStructure",     "09E6",
  5376.  
  5377.  "PaintWhite",       "09DC",
  5378.  "Params",           "03A4",
  5379.  "pCDeskPat",        "020B",
  5380.  "PmgrHandle",       "0DC8",
  5381.  "PollProc",         "013E",
  5382.  "PollRtnAddr",      "0128",
  5383.  "PollStack",        "013A",
  5384.  "PortAUse",         "0290",
  5385.  "PortBUse",         "0291",
  5386.  "PortList",         "0D66",
  5387.  "PrintErr",         "0944",
  5388.  "PrintVars",        "0944",
  5389.  "PWMBuf1",          "0B0A",
  5390.  "PWMBuf2",          "0312",
  5391.  "PWMValue",         "0138",
  5392.  
  5393.  "QDColors",         "08B0",
  5394.  "QDErr",            "0D6E",
  5395.  "QDExist",          "08F3",
  5396.  
  5397.  "RAMBase",          "02B2",
  5398.  "RawMouse",         "082C",
  5399.  "RegRsrc",          "0347",
  5400.  "ReqstVol",         "03EE",
  5401.  "ResErr",           "0A60",
  5402.  "ResErrProc",       "0AF2",
  5403.  "ResLoad",          "0A5E",
  5404.  "ResReadOnly",      "0A5C",
  5405.  "RestProc",         "0A8C",
  5406.  "ResumeProc",       "0A8C",
  5407.  "RGBBlack",         "0C10",
  5408.  "RGBWhite",         "0C16",
  5409.  "RgSvArea",         "036A",
  5410.  "RMgrHiVars",       "0B80",
  5411.  "RMgrPerm",         "0BA4",
  5412.  "RndSeed",          "0156",
  5413.  "ROM85",            "028E",
  5414.  "ROMBase",          "02AE",
  5415.  "RomFont0",         "0980",
  5416.  "ROMMapHndl",       "0B06",
  5417.  "RomMapInsert",     "0B9E",
  5418.  "RowBits",          "0C20",
  5419.  "RSDHndl",          "028A",
  5420.  
  5421.  "SavedHandle",      "0A28",
  5422.  "SavedHilite",      "0D43",
  5423.  "SaveFondFlags",    "0986",
  5424.  "SaveProc",         "0A90",
  5425.  "SaveSegHandle",    "0930",
  5426.  "SaveSP",           "0A94",
  5427.  "SaveUpdate",       "09DA",
  5428.  "SaveVisRgn",       "09F2",
  5429.  "SCCASts",          "02CE",
  5430.  "SCCBSts",          "02CF",
  5431.  "SCCRd",            "01D8",
  5432.  "SCCWr",            "01DC",
  5433.  "ScrapCount",       "0968",
  5434.  "ScrapHandle",      "0964",
  5435.  "ScrapInfo",        "0960",
  5436.  "ScrapName",        "096C",
  5437.  "ScrapSize",        "0960",
  5438.  "ScrapState",       "096A",
  5439.  "ScrapTag",         "0970",
  5440.  "ScrapVars",        "0960",
  5441.  "Scratch20",        "01E4",
  5442.  "Scratch8",         "09FA",
  5443.  "ScrDmpEnb",        "02F8",
  5444.  "ScrDmpType",       "02F9",
  5445.  "ScreenBytes",      "0C24",
  5446.  "ScreenRow",        "0106",
  5447.  "ScreenVars",       "0292",
  5448.  "ScrHRes",          "0104",
  5449.  "ScrnBase",         "0824",
  5450.  "ScrnVBLPtr",       "0D10",
  5451.  "ScrVRes",          "0102",
  5452.  "SCSIBase",         "0C00",
  5453.  "SCSIDMA",          "0C04",
  5454.  "SCSIDrvrs",        "0B2E",
  5455.  "SCSIFlag",         "0B22",
  5456.  "SCSIGlobals",      "0C0C",
  5457.  "SCSIHsk",          "0C08",
  5458.  "SCSIPoll",         "0C2F",
  5459.  "SdEnable",         "0261",
  5460.  "SDMBusErr",        "0DC0",
  5461.  "SDMJmpTblPtr",     "0DB8",
  5462.  "SdVolume",         "0260",
  5463.  "SegHiEnable",      "0BB2",
  5464.  "SerialVars",       "02D0",
  5465.  "SEVarBase",        "0C30",
  5466.  "SEvtEnb",          "015C",
  5467.  "SFSaveDisk",       "0214",
  5468.  "SInfoPtr",         "0CBC",
  5469.  "SInitFlags",       "0D90",
  5470.  "SlotPrTbl",        "0D08",
  5471.  "SlotQDT",          "0D04",
  5472.  "SlotTICKS",        "0D14",
  5473.  "SlotVBLQ",         "0D0C",
  5474.  "SMGlobals",        "0CC4",
  5475.  "SmgrCore",         "0BA0",
  5476.  "SonyVars",         "0134",
  5477.  "SoundActive",      "027E",
  5478.  "SoundBase",        "0266",
  5479.  "SoundDCE",         "027A",
  5480.  "SoundGlue",        "0AE8",
  5481.  "SoundLevel",       "027F",
  5482.  "SoundPtr",         "0262",
  5483.  "SoundVars",        "0262",
  5484.  "SoundVBL",         "026A",
  5485.  "SPAlarm",          "0200",
  5486.  "SPATalkA",         "01F9",
  5487.  "SPATalkB",         "01FA",
  5488.  "SPClikCaret",      "0209",
  5489.  "SPConfig",         "01FB",
  5490.  "SPFont",           "0204",
  5491.  "SPKbd",            "0206",
  5492.  "SPMisc1",          "020A",
  5493.  "SPMisc2",          "020B",
  5494.  "SPPortA",          "01FC",
  5495.  "SPPortB",          "01FE",
  5496.  "SPPrint",          "0207",
  5497.  "SPValid",          "01F8",
  5498.  "SPVolCtl",         "0208",
  5499.  "SrcDevice",        "08A0",
  5500.  "SRsrcTblPtr",      "0D24",
  5501.  "StkLowPt",         "0110",
  5502.  "Switcher",         "0282",
  5503.  "SwitcherTPtr",     "0286",
  5504.  "SynListHandle",    "0D32",
  5505.  "SysCom",           "0100",
  5506.  "SysEvtBuf",        "0146",
  5507.  "SysEvtMask",       "0144",
  5508.  "SysFontFam",       "0BA6",
  5509.  "SysFontSize",      "0BA8",
  5510.  "SysMap",           "0A58",
  5511.  "SysMapHndl",       "0A54",
  5512.  "SysParam",         "01F8",
  5513.  "SysResName",       "0AD8",
  5514.  "SysVersion",       "015A",
  5515.  "SysZone",          "02A6",
  5516.  
  5517.  "T1Arbitrate",      "0B3F",
  5518.  "TableSeed",        "0D20",
  5519.  "TagData",          "02FA",
  5520.  "TaskLock",         "0A62",
  5521.  "TEDoText",         "0A70",
  5522.  "TempRect",         "09FA",
  5523.  "TERecal",          "0A74",
  5524.  "TEScrpHandle",     "0AB4",
  5525.  "TEScrpLength",     "0AB0",
  5526.  "TESysJust",        "0BAC",
  5527.  "TEWdBreak",        "0AF6",
  5528.  "TheCrsr",          "0844",
  5529.  "TheGDevice",       "0CC8",
  5530.  "TheMenu",          "0A26",
  5531.  "TheZone",          "0118",
  5532.  "Ticks",            "016A",
  5533.  "Time",             "020C",
  5534.  "TimeDBRA",         "0D00",
  5535.  "TimeSCCDB",        "0D02",
  5536.  "TimeSCSIDB",       "0DA6",
  5537.  "TimeVars",         "0B30",
  5538.  "TmpResLoad",       "0B9F",
  5539.  "Tocks",            "0173",
  5540.  "ToExtFS",          "03F2",
  5541.  "ToolScratch",      "09CE",
  5542.  "TopMapHndl",       "0A50",
  5543.  "TopMenuItem",      "0A0A",
  5544.  "TrapAgain",        "0B00",
  5545.  "Twitcher1",        "0B50",
  5546.  "Twitcher2",        "0B7C",
  5547.  
  5548.  "UnitNtryCnt",      "01D2",
  5549.  "UsedFWidths",      "0BF5",
  5550.  "UTableBase",       "011C",
  5551.  
  5552.  "VBLQueue",         "0160",
  5553.  "VCBQHdr",          "0356",
  5554.  "VertRRate",        "0D30",
  5555.  "VIA",              "01D4",
  5556.  "VIA2DT",           "0D70",
  5557.  "VideoInfoOK",      "0DB0",
  5558.  "VidMode",          "0C2E",
  5559.  "VidType",          "0C2D",
  5560.  
  5561.  "WarmStart",        "0CFC",
  5562.  "WidthListHand",    "08E4",
  5563.  "WidthPtr",         "0B10",
  5564.  "WidthTabHandle",   "0B2A",
  5565.  "WindowList",       "09D6",
  5566.  "WMgrCPort",        "0D2C",
  5567.  "WMgrPort",         "09DE",
  5568.  "WordRedraw",       "0BA5",
  5569.  "WWExist",          "08F2",
  5570.      };
  5571. };
  5572.  
  5573. type 'mxbm'{
  5574.  integer = $$CountOf(symbols);          /* Number of entries     */
  5575.  array symbols { pString; pString; };   /* Macro name; expansion */
  5576. };
  5577.  
  5578.  
  5579. /* These macros enable you to type "ATB ListManagerCall" as if ListManagerCall was a trap */
  5580.  
  5581. resource 'mxbm' (104) {
  5582.    {
  5583.  "LActivate",        "Pack0 SP^.W=#0",
  5584.  "LAddColumn",       "Pack0 SP^.W=#4",
  5585.  "LAddRow",          "Pack0 SP^.W=#8",
  5586.  "LAddToCell",       "Pack0 SP^.W=#12",
  5587.  "LAutoScroll",      "Pack0 SP^.W=#16",
  5588.  "LCellSize",        "Pack0 SP^.W=#20",
  5589.  "LClick",           "Pack0 SP^.W=#24",
  5590.  "LClrCell",         "Pack0 SP^.W=#28",
  5591.  "LDelColumn",       "Pack0 SP^.W=#32",
  5592.  "LDelRow",          "Pack0 SP^.W=#36",
  5593.  "LDispose",         "Pack0 SP^.W=#40",
  5594.  "LDoDraw",          "Pack0 SP^.W=#44",
  5595.  "LDraw",            "Pack0 SP^.W=#48",
  5596.  "LFind",            "Pack0 SP^.W=#52",
  5597.  "LGetCell",         "Pack0 SP^.W=#56",
  5598.  "LGetSelect",       "Pack0 SP^.W=#60",
  5599.  "LLastClick",       "Pack0 SP^.W=#64",
  5600.  "LNew",             "Pack0 SP^.W=#68",
  5601.  "LNextCell",        "Pack0 SP^.W=#72",
  5602.  "LRect",            "Pack0 SP^.W=#76",
  5603.  "LScroll",          "Pack0 SP^.W=#80",
  5604.  "LSearch",          "Pack0 SP^.W=#84",
  5605.  "LSetCell",         "Pack0 SP^.W=#88",
  5606.  "LSetSelect",       "Pack0 SP^.W=#92",
  5607.  "LSize",            "Pack0 SP^.W=#96",
  5608.  "LUpdate",          "Pack0 SP^.W=#100",
  5609.    };
  5610. };
  5611.  
  5612. æKY mxbi
  5613. æC  This resource initializes MacsBug options for:
  5614.  
  5615.  • The number of traps that are recorded using ATR/ATP commands
  5616.  • The number of lines in the PC window
  5617.  • The number of bytes used to save the command history
  5618.  
  5619. If no mxbi resource is found then MacsBug defaults to:
  5620.  
  5621.  • 16 traps recorded
  5622.  • 2  lines in the PC window
  5623.  • 2K bytes of command history
  5624.  
  5625. */
  5626.  
  5627. type 'mxbi' { integer; integer; integer; };
  5628.  
  5629. resource 'mxbi' (0) {
  5630.      16,     /* Record the last 16 traps */
  5631.  2,      /* Display the procedure name and one disassembled lines */
  5632.  2048;   /* Save 2K bytes of command output for later review */
  5633. };
  5634.  
  5635.  
  5636.  
  5637. type 'mxbm'{
  5638.  integer = $$CountOf(symbols);          /* Number of entries     */
  5639.  array symbols { pString; pString; };   /* Macro name; expansion */
  5640. };
  5641.  
  5642.  
  5643. /* These macros enable you to type "ATB HFSCall" as if HFSCall was a trap */
  5644.  
  5645. resource 'mxbm' (103) {
  5646.    {
  5647.  "OpenWD",       "HFSDispatch D0.W=#1",
  5648.  "CloseWD",      "HFSDispatch D0.W=#2",
  5649.  "CatMove",      "HFSDispatch D0.W=#5",
  5650.  "DirCreate",    "HFSDispatch D0.W=#6",
  5651.  "GetWDInfo",    "HFSDispatch D0.W=#7",
  5652.  "GetFCBInfo",   "HFSDispatch D0.W=#8",
  5653.  "GetCatInfo",   "HFSDispatch D0.W=#9",
  5654.  "SetCatInfo",   "HFSDispatch D0.W=#10",
  5655.  "SetVolInfo",   "HFSDispatch D0.W=#11",
  5656.  "LockRgn",      "HFSDispatch D0.W=#16",
  5657.  "UnlockRgn",    "HFSDispatch D0.W=#17",
  5658.    };
  5659. };
  5660.  
  5661.  
  5662. type 'mxbm'{
  5663.  integer = $$CountOf(symbols);          /* Number of entries     */
  5664.  array symbols { pString; pString; };   /* Macro name; expansion */
  5665. };
  5666.  
  5667.  
  5668. /* These macros enable you to type "ATB FO<name>" as if FO<name> was a trap */
  5669.  
  5670. resource 'mxbm' (102) {
  5671.    {
  5672.  "FOADD",        "FP68K (SP+1)^.B=0",
  5673.  "FOSUB",        "FP68K (SP+1)^.B=2",
  5674.  "FOMUL",        "FP68K (SP+1)^.B=4",
  5675.  "FODIV",        "FP68K (SP+1)^.B=6",
  5676.  "FOCMP",        "FP68K (SP+1)^.B=9",
  5677.  "FOCPX",        "FP68K (SP+1)^.B=A",
  5678.  "FOREM",        "FP68K (SP+1)^.B=C",
  5679.  "FOZ2X",        "FP68K (SP+1)^.B=E",
  5680.  "FOX2Z",        "FP68K (SP+1)^.B=10",
  5681.  "FOSQRT",       "FP68K (SP+1)^.B=12",
  5682.  "FORTI",        "FP68K (SP+1)^.B=14",
  5683.  "FOTTI",        "FP68K (SP+1)^.B=16",
  5684.  "FOSCALB",      "FP68K (SP+1)^.B=18",
  5685.  "FOLOGB",       "FP68K (SP+1)^.B=1A",
  5686.  "FOCLASS",      "FP68K (SP+1)^.B=1C",
  5687.  
  5688.  "FOSETENV",     "FP68K (SP+1)^.B=1",
  5689.  "FOGETENV",     "FP68K (SP+1)^.B=3",
  5690.  "FOSETHV",      "FP68K (SP+1)^.B=5",
  5691.  "FOGETHV",      "FP68K (SP+1)^.B=7",
  5692.  "FOD2B",        "FP68K (SP+1)^.B=9",
  5693.  "FOB2D",        "FP68K (SP+1)^.B=B",
  5694.  "FONEG",        "FP68K (SP+1)^.B=D",
  5695.  "FOABS",        "FP68K (SP+1)^.B=F",
  5696.  "FOCPYSGN",     "FP68K (SP+1)^.B=11",
  5697.  "FONEXT",       "FP68K (SP+1)^.B=13",
  5698.  "FOSETXCP",     "FP68K (SP+1)^.B=15",
  5699.  "FOPROCENTRY",  "FP68K (SP+1)^.B=17",
  5700.  "FOPROCEXIT",   "FP68K (SP+1)^.B=19",
  5701.  "FOTESTXCP",    "FP68K (SP+1)^.B=1B",
  5702.  
  5703.  "FOLNX",        "ELEMS68K (SP+1)^.B=0",
  5704.  "FOLOG2X",      "ELEMS68K (SP+1)^.B=2",
  5705.  "FOLN1X",       "ELEMS68K (SP+1)^.B=4",
  5706.  "FOLOG21X",     "ELEMS68K (SP+1)^.B=6",
  5707.  "FOEXPX",       "ELEMS68K (SP+1)^.B=8",
  5708.  "FOEXP2X",      "ELEMS68K (SP+1)^.B=A",
  5709.  "FOEXP1X",      "ELEMS68K (SP+1)^.B=C",
  5710.  "FOEXP21X",     "ELEMS68K (SP+1)^.B=C",
  5711.  "FOXPWRI",      "ELEMS68K (SP+1)^.B=10",
  5712.  "FOXPWRY",      "ELEMS68K (SP+1)^.B=12",
  5713.  "FOCOMPOUND",   "ELEMS68K (SP+1)^.B=14",
  5714.  "FOANNUITY",    "ELEMS68K (SP+1)^.B=16",
  5715.  "FOSINX",       "ELEMS68K (SP+1)^.B=18",
  5716.  "FOCOSX",       "ELEMS68K (SP+1)^.B=1A",
  5717.  "FOTANX",       "ELEMS68K (SP+1)^.B=1C",
  5718.  "FOATANX",      "ELEMS68K (SP+1)^.B=1E",
  5719.  "FORANDX",      "ELEMS68K (SP+1)^.B=20",
  5720.  
  5721.  "FOPSTR2DEC",   "DecStr68K (SP+1)^.B=2",
  5722.  "FOCSTR2DEC",   "DecStr68K (SP+1)^.B=4",
  5723.  "FODEC2STRC",   "DecStr68K (SP+1)^.B=3",
  5724.    };
  5725. };
  5726.  
  5727. æKY mxbc 
  5728. æC  This resource sets the foreground and background colors for the MacsBug display.
  5729. The default is black characters on a white background.
  5730.  
  5731. */
  5732.  
  5733. type 'mxbc' { integer; integer; integer; integer; integer; integer; };
  5734.  
  5735. resource 'mxbc' (0) {
  5736.      $FFFF,    /* Background Red   */
  5737.      $FFFF,    /*            Green */
  5738.      $FFFF,    /*            Blue  */
  5739.      $0,       /* Foreground Red   */
  5740.      $0,       /*            Green */
  5741.      $0,       /*            Blue  */
  5742. };
  5743.  
  5744.  
  5745.  
  5746.